fix: 处理ts报错
This commit is contained in:
parent
4d05697b1c
commit
afc6cf04a1
@ -35,10 +35,7 @@ axiosInstance.interceptors.request.use(
|
|||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
const userInfo = info[SystemStoreEnum.USER_INFO]
|
const userInfo = info[SystemStoreEnum.USER_INFO]
|
||||||
config.headers = {
|
config.headers[userInfo[SystemStoreUserInfoEnum.TOKEN_NAME] || 'token'] = userInfo[SystemStoreUserInfoEnum.USER_TOKEN] || ''
|
||||||
...config.headers,
|
|
||||||
[userInfo[SystemStoreUserInfoEnum.TOKEN_NAME] || 'token']: userInfo[SystemStoreUserInfoEnum.USER_TOKEN] || ''
|
|
||||||
} as InternalAxiosRequestConfig['headers']
|
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
(err: AxiosError) => {
|
(err: AxiosError) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user