请看下面我的回答(下客介),来个人帮帮,不想再熬夜了。感谢不懂后端,望提供前端可以解决的方案,感谢1-fetch跨域请求"聚合数据"提供的新闻API,报“ No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.”2-相关代码段webpack.config.js片段:安装了:var proxy = require('http-proxy-middleware');require('es6-promise').polyfill();require('isomorphic-fetch')xxx.js片段:3-浏览器console与network截图:
添加回答
举报
0/150
提交
取消