修改问题

This commit is contained in:
guanj
2026-03-17 08:43:51 +08:00
parent 9202da17f1
commit 7d2ce51510
6 changed files with 127 additions and 61 deletions

View File

@@ -104,11 +104,11 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
if (token) {
;(config.headers as anyObj).Authorization = token
} else {
config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw=='
config.headers.Authorization = 'Basic bmpjbjpuamNucHFz'
}
}
if (config.url == '/user-boot/user/generateSm2Key' || config.url == '/pqs-auth/oauth/token') {
config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw=='
config.headers.Authorization = 'Basic bmpjbjpuamNucHFz'
}
return config
@@ -145,6 +145,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
return refreshToken()
.then(res => {
adminInfo.setToken(res.data.access_token, 'auth')
adminInfo.setToken(res.data.refresh_token, 'refresh')
window.requests.forEach(cb => cb(res.data.access_token))
window.requests = []