获取token修改

This commit is contained in:
仲么了
2024-01-22 10:31:07 +08:00
parent ac96d0365a
commit 08e0e9e013
6 changed files with 138 additions and 26 deletions

View File

@@ -67,6 +67,8 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
// 自动携带token
if (config.headers) {
const token = adminInfo.getToken()
console.log(token)
console.log(token.length, 'token')
if (token) {
;(config.headers as anyObj).Authorization = token
} else {