fix: 修改请求接口 token 名称

This commit is contained in:
奔跑的面条
2022-09-18 17:45:59 +08:00
parent 3358e164a1
commit 75067221da
3 changed files with 13 additions and 8 deletions
+3 -2
View File
@@ -23,10 +23,11 @@ axiosInstance.interceptors.request.use(
if (!info) {
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
return config
}
}
const userInfo = info[SystemStoreEnum.USER_INFO]
config.headers = {
...config.headers,
[RequestHttpHeaderEnum.TOKEN]: info[SystemStoreEnum.USER_INFO][SystemStoreUserInfoEnum.USER_TOKEN] || ''
[userInfo[SystemStoreUserInfoEnum.TOKEN_NAME]]: userInfo[SystemStoreUserInfoEnum.USER_TOKEN] || ''
}
return config
},