feat: token
This commit is contained in:
@@ -40,7 +40,12 @@ axiosInstance.interceptors.request.use(
|
||||
const userInfo = info[SystemStoreEnum.USER_INFO]
|
||||
if (userInfo && userInfo[SystemStoreUserInfoEnum.USER_TOKEN]) {
|
||||
config.headers['authorization'] = userInfo[SystemStoreUserInfoEnum.USER_TOKEN]
|
||||
console.log('[GoView] 请求拦截器:添加 authorization 头:', userInfo[SystemStoreUserInfoEnum.USER_TOKEN])
|
||||
} else {
|
||||
console.warn('[GoView] 请求拦截器:未找到 token')
|
||||
}
|
||||
} else {
|
||||
console.warn('[GoView] 请求拦截器:未找到 GO_SYSTEM_STORE')
|
||||
}
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user