|
@@ -43,12 +43,6 @@ axios.interceptors.request.use(
|
|
|
|
|
|
queue.push(1);
|
|
|
|
|
|
- // 为请求地址添加全局domain
|
|
|
- let domain = Vue.ls.get("domain", "");
|
|
|
- if (config.url.indexOf("http://") < 0) {
|
|
|
- config.url = domain + config.url;
|
|
|
- }
|
|
|
-
|
|
|
// 为请求头添加鉴权信息
|
|
|
let token = Vue.ls.get("token");
|
|
|
if (token) {
|
|
@@ -78,6 +72,11 @@ axios.interceptors.request.use(
|
|
|
config.headers["Authorization"] = Authorization;
|
|
|
config.headers["time"] = timestamp;
|
|
|
}
|
|
|
+ // 为请求地址添加全局domain
|
|
|
+ let domain = Vue.ls.get("domain", "");
|
|
|
+ if (config.url.indexOf("http://") < 0) {
|
|
|
+ config.url = domain + config.url;
|
|
|
+ }
|
|
|
config.headers["deviceId"] = DEVICE_ID;
|
|
|
config.headers["platform"] = PLATFORM;
|
|
|
config.headers["domain"] = domain;
|