lipengzhou / toutiao-m Goto Github PK
View Code? Open in Web Editor NEW基于 Vue.js 开发的移动端项目——今日头条(页面下方扫码体验)
Home Page: https://toutiao.m.lipengzhou.com/
License: MIT License
基于 Vue.js 开发的移动端项目——今日头条(页面下方扫码体验)
Home Page: https://toutiao.m.lipengzhou.com/
License: MIT License
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
一直在报错
我数据持久化的时候 刷新页面没有保存,但是在请求里 也有,就是页面上保存不了.
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)
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是怎么做到,比如nav-bar,你可以通过prop或插槽插入左侧文字,如果你不插入,那么左侧这个标签就不会展示。
老师自己可以试一下,根本做不到这样封装
在vue devtools 中输入articlelist的时候,点击这个组件,会出现这个错误,即不能在vue devtools中查询到props传过来的channel数据。上网搜索并没有找到什么解决办法
接口:获取用户自己信息:http://ttapi.research.itcast.cn/app/v1_0/user,
这个接口,我按接口文档要求发起请求,结果前端报500错误,后台返回message:Internal Server Error,我添加的token在其他需要token的接口测试过,可以正常获取信息,比如:http://ttapi.research.itcast.cn/app/v1_0/user/followings这个接口,希望大佬看到反馈一下
该项目的接口挂了,还有后台项目的接口也挂了emm
接口是用什么写的呢,可以分享吗
李老师,网站貌似进不去,是关闭了吗还是 想跟着学习一下
我一直在学习老师的视频,老师的的视频对我的帮助很大,感谢老师~~
在看视频的过程中有一个疑问, 想跟老师核实一下:
下面视频:
https://www.bilibili.com/video/BV1tN411f7tV?p=141
讲解了对评论的点赞和取消点赞, 但在中,comment属于props , 直接在中操作props属性是否是错误的, 是不是应该在父组件中操作comment, 此处是否采用自定义事件更合适.
辛苦老师核查~~
B站上的视频源都删除了,能否提供一个能看或者下载的地址吗?
浏览器访问接口
http://localhost:8080/api/app/v1_1/articles?channel_id=0×tamp=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"
那个接口可以使用吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.