|
|
|
@ -15,10 +15,6 @@ const instance = axios.create({ |
|
|
|
|
timeout: 10000, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
let token = ""; |
|
|
|
|
let unionId = ""; |
|
|
|
|
let openId = ""; |
|
|
|
|
|
|
|
|
|
instance.interceptors.request.use( |
|
|
|
|
(config) => { |
|
|
|
|
if (!config.hideLoading) { |
|
|
|
@ -27,15 +23,9 @@ instance.interceptors.request.use( |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!token) { |
|
|
|
|
token = uni.getStorageSync("Authorization") || " "; |
|
|
|
|
} |
|
|
|
|
if (!unionId) { |
|
|
|
|
unionId = uni.getStorageSync("unionid"); |
|
|
|
|
} |
|
|
|
|
if (!openId) { |
|
|
|
|
openId = uni.getStorageSync("openid"); |
|
|
|
|
} |
|
|
|
|
const token = uni.getStorageSync("Authorization") || " "; |
|
|
|
|
const unionId = uni.getStorageSync("unionid"); |
|
|
|
|
const openId = uni.getStorageSync("openid"); |
|
|
|
|
|
|
|
|
|
config.headers["Authorization"] = token; |
|
|
|
|
config.headers["imei"] = unionId; |
|
|
|
|