一次性链接

This commit is contained in:
Linzm committed 2025-06-23 10:00:03 +08:00
1 parent d8316cf49d
commit e08c168e4e
10 files changed
+147 -27

No files matched your search

+6 -1
View File
@@ -53,10 +53,15 @@ const requestHandler = (config: InternalAxiosRequestConfig): InternalAxiosReques
// const savedToken = localStorage.get(STORAGE_TOKEN_KEY)
// 如果 token 存在
const code = localStorage.get('code')
const trialCode = localStorage.get('trialCode')
const userId = localStorage.get('userId')
// 让每个请求携带自定义 token, 请根据实际情况修改
if (code)
config.headers['Authorization'] = code
if (trialCode)
config.headers['Authorization'] = trialCode
if (userId)
config.headers['Userid'] = userId
return config
}