Commit cfc04940 by liangqi

添加跨域支持

parent 9b2efc47
...@@ -36,15 +36,12 @@ import '@/assets/less/style3.less' ...@@ -36,15 +36,12 @@ import '@/assets/less/style3.less'
import '@/assets/less/style4.less' import '@/assets/less/style4.less'
axios.defaults.withCredentials = false; axios.defaults.withCredentials = false;
axios.interceptors.request.use(
config=>{ axios.defaults.timeout = 50000;
axios.interceptors.request.use(config => {
config.headers = { config.headers = {
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded'
} }
}
);
axios.defaults.timeout = 50000;
axios.interceptors.request.use(config => {
return checkToken().then(function(res) { return checkToken().then(function(res) {
config.headers['Authorization'] = 'Bearer ' + res; config.headers['Authorization'] = 'Bearer ' + res;
return config; return config;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment