摘要: vue项目中,前端与后台进行数据请求或者提交的时候,如果后台没有设置跨域,前端本地调试代码的时候就会报“No 'Access Control Allow Origin' header is present on the requested resource.” 这种跨域错误。 一.要想本地正常的调试 阅读全文
posted @ 2018-02-23 13:39 璐松鼠 阅读(2371) 评论(0) 推荐(0) 编辑
摘要: vue resource 携带cookie请求 vue cookie 跨域 1、依赖VueResource 确保已安装vue resource到项目中,找到当前项目,命令行输入: 在主方法添加 过滤 以下是针对每个请求都会携带cookie ,也可以指定接口请求携带cookie 阅读全文
posted @ 2018-02-23 11:35 璐松鼠 阅读(2145) 评论(0) 推荐(0) 编辑