src/assets/js/axios.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/assets/js/axios.js
@@ -11,13 +11,13 @@ } // 添加请求拦截器 axios.interceptors.request.use(function (config) { if(config.asy){ if (config.asy) { if (process.env.NODE_ENV == 'dev') { // 跨域请求 config.baseURL = 'http://localhost:8919/fg'; config.withCredentials = true; // 保持请求头 } else { config.baseURL = '/fg'; config.baseURL = `http://${location.hostname}:8919/fg`; config.withCredentials = true; // 保持请求头 } }