Commit 3b068a9a authored by 郭志伟's avatar 郭志伟

build: 联调暴露全局变量

parent 6d3f0cd3
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
}); });
} }
})(); })();
// ! 上线需要删掉
var baseUrl = "";
</script> </script>
</head> </head>
<body> <body>
......
...@@ -25,7 +25,6 @@ const { Notify } = cherry; ...@@ -25,7 +25,6 @@ const { Notify } = cherry;
const CancelToken = axios.CancelToken; const CancelToken = axios.CancelToken;
let pending = {}; let pending = {};
let reqNum = 0; let reqNum = 0;
axios.defaults.baseURL = config.basicHost; axios.defaults.baseURL = config.basicHost;
axios.defaults.timeout = 30000; axios.defaults.timeout = 30000;
...@@ -55,7 +54,9 @@ axios.interceptors.request.use( ...@@ -55,7 +54,9 @@ axios.interceptors.request.use(
pending[config.url]("取消重复请求"); pending[config.url]("取消重复请求");
} }
config.cancelToken = new CancelToken(c => (pending[config.url] = c)); config.cancelToken = new CancelToken(c => (pending[config.url] = c));
// ! 上线需要删掉
// eslint-disable-next-line
config.baseURL = baseUrl || config.baseURL;
// 添加token // 添加token
const token = localStorage.get("mongoToken"); const token = localStorage.get("mongoToken");
if (token) { if (token) {
......
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 to comment