feat: token

This commit is contained in:
ygx
2025-12-27 12:57:38 +08:00
parent d760e8f6cc
commit 7a5fa1f4ea
4 changed files with 95 additions and 10 deletions

View File

@@ -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