|
@@ -87,10 +87,12 @@ const ToolClass = {
|
87
|
87
|
method: target.method,
|
88
|
88
|
url: Url,
|
89
|
89
|
data: Data,
|
90
|
|
- headers: { ...Header }
|
|
90
|
+ headers: { ...Header },
|
|
91
|
+ baseURL: process.env.NODE_ENV === 'production' ? 'https://api.xnsport.cn/' : '/'
|
91
|
92
|
}
|
92
|
93
|
Axios({ ...aParams }).then(res => {
|
93
|
|
- const token = res.headers['x-authorization-jwt']
|
|
94
|
+ // console.log('response---->', res)
|
|
95
|
+ const token = res.headers['X-Authorization-JWT'] || res.headers['x-authorization-jwt'] || res.headers['X-AUTHORIZATION-JWT']
|
94
|
96
|
if (token) { // 更新本地存储token
|
95
|
97
|
window.localStorage.Jwt = token
|
96
|
98
|
window.localStorage.JwtTime = Date.now()
|