邮件发送成功,但出现跨域问题
在最后一节课的跨域问题操作中出现了问题,nodemailer可以返回前台输入的数据,也按照课程中的方式配置了vue.config.js,但是还是出现错误,
github地址:https://github.com/wwwyyying/pc-front



正在回答 回答被采纳积分+1
npm run dev
> 8-9@1.0.0 dev E:\demo\imooc-login\完成邮件服务接口与找回密码对接\demo-api
> cross-env NODE_ENV=dev nodemon --exec babel-node --inspect ./src/index.js
[nodemon] 1.19.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node --inspect ./src/index.js`
Starting inspector on 127.0.0.1:9229 failed: address already in use
[nodemon] app crashed - waiting for file changes before starting...
吴万斌(568109135) 13:50:02
找到问题了
端口被占用了, 即使 本地服务停了 接口还可以请求成功了
window7 下 https://www.cnblogs.com/hsqqy/p/10609924.html
跨域的问题一般在后端设置即可,参考koa的项目中的cors设置:
https://git.imooc.com/class-70/toimc-api/src/master/src/index.js#L44




恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星