Coder Social home page Coder Social logo

lipengzhou / toutiao-m Goto Github PK

View Code? Open in Web Editor NEW
169.0 6.0 55.0 8.04 MB

基于 Vue.js 开发的移动端项目——今日头条(页面下方扫码体验)

Home Page: https://toutiao.m.lipengzhou.com/

License: MIT License

JavaScript 4.99% HTML 62.45% Vue 27.35% CSS 4.95% Less 0.26%

toutiao-m's Issues

websocket 报错

Access to XMLHttpRequest at 'http://ttapi.research.itcast.cn/socket.io/?EIO=4&transport=polling&t=NeiIwF6' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

GET http://ttapi.research.itcast.cn/socket.io/?EIO=4&transport=polling&t=NeiItdF net::ERR_FAILED

一直在报错

头条channel-edit 中 有问题

我数据持久化的时候 刷新页面没有保存,但是在请求里 也有,就是页面上保存不了.

    async deleteChannel(channel, index) {
      //如果删除激活频道前面的频道
      if (index <= this.active) {
        this.$emit("updata-active", this.active - 1);
      }
      this.userChannels.splice(index, 1);
      //数据持久化
      if (this.user) {
        await deleteUserChannel(channel.id);
      } else {
        setItem("user-channel", this.userChannels);
      }
    },
    //切换频道
    switchChannel(index) {
      this.$emit("update-active", index);
      //关闭弹出层
      this.$emit("close");
    },
  },```
![image](https://user-images.githubusercontent.com/84443293/125442821-3d57adc5-5471-4881-b829-a3ff8b796ee9.png)

项目出现:找不到babel模块的错误解决办法

 ERROR  Failed to compile with 1 errors                                                                                                   2:38:42 ├F10: PM┤

 error  in ./src/main.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] C:\Users\zzz\Desktop\topline-m\src\main.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
Require stack:
- C:\Users\zzz\Desktop\topline-m\node_modules\@babel\preset-env\lib\polyfills\corejs3\usage-plugin.js
- C:\Users\zzz\Desktop\topline-m\node_modules\@babel\preset-env\lib\index.js
- C:\Users\zzz\Desktop\topline-m\node_modules\@vue\babel-preset-app\index.js
- C:\Users\zzz\Desktop\topline-m\node_modules\@vue\cli-plugin-babel\preset.js
- C:\Users\zzz\Desktop\topline-m\node_modules\@babel\core\lib\config\files\plugins.js
- C:\Users\zzz\Desktop\topline-m\node_modules\@babel\core\lib\config\files\index.js
- C:\Users\zzz\Desktop\topline-m\node_modules\@babel\core\lib\index.js
- C:\Users\zzz\Desktop\topline-m\node_modules\@vue\cli-plugin-babel\index.js

我的电脑没有安装babel, clone下来运行报错,在stack overflow找到了解决方法

https://stackoverflow.com/questions/52087421/module-build-failed-from-node-modules-babel-loader-lib-index-js-typeerror

希望可以对你有帮助

Vant疑问

Vant是怎么做到,比如nav-bar,你可以通过prop或插槽插入左侧文字,如果你不插入,那么左侧这个标签就不会展示。
老师自己可以试一下,根本做不到这样封装

接口挂了

该项目的接口挂了,还有后台项目的接口也挂了emm

接口

接口是用什么写的呢,可以分享吗

网站进不去

李老师,网站貌似进不去,是关闭了吗还是 想跟着学习一下

老师, B站上一个视频是否讲解有误, 和您核实一下

我一直在学习老师的视频,老师的的视频对我的帮助很大,感谢老师~~

在看视频的过程中有一个疑问, 想跟老师核实一下:
下面视频:
https://www.bilibili.com/video/BV1tN411f7tV?p=141

讲解了对评论的点赞和取消点赞, 但在中,comment属于props , 直接在中操作props属性是否是错误的, 是不是应该在父组件中操作comment, 此处是否采用自定义事件更合适.

辛苦老师核查~~

B站视频没有了

B站上的视频源都删除了,能否提供一个能看或者下载的地址吗?

接口请求的数据为什么浏览器预览是空的?

浏览器访问接口
http://localhost:8080/api/app/v1_1/articles?channel_id=0&timestamp=1626170232354&with_top=1
可以正常显示results里面的数据,但是在浏览器控制台看preview或response 栏目空的:
{message: "OK", data: {pre_timestamp: null, results: [], page: 12}} data: {pre_timestamp: null, results: [], page: 12} page: 12 pre_timestamp: null results: [] message: "OK"

接口

那个接口可以使用吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.