import axios from 'axios';
axios.defaults.withCredentials=true
axios.defaults.crossDomain=true
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
// 正式环境接口转向
// axios.defaults.baseURL = '//aaa.eos.dev.enbrands.com';
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// axios.defaults.headers.get['Content-Type'] = 'application/x-www-form-urlencoded';
axios配置允许跨域
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- (1) babel-polyfill 在低版本的浏览器中不能支持es6语法,所以用babel-polyfill来解...
- 1、首先axios是不支持vue.use()方式声明使用的建议也是最常用的方式 2.小小的提一下vue cli脚手...
- Vue跨域配置 在Vue项目目录中打开config/index.js,在proxyTable中添写如下代码: No...