forked from natuka/web.puabadge.com
一次性链接
This commit is contained in:
1 parent
d8316cf49d
commit
e08c168e4e
10 files changed
+147
-27
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user