提交
This commit is contained in:
1 parent
a0da6427ef
commit
86694f739f
471 files changed
+62075
-44805
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { API_BASE, TOKEN_KEY, REFRESH_TOKEN_KEY, USER_INFO_KEY } from '@/config/api'
|
||||
import { TOKEN_KEY, REFRESH_TOKEN_KEY, USER_INFO_KEY, resolveApiBase } from '@/config/api'
|
||||
|
||||
let clearingAuth = false
|
||||
// TODO(config-hardcoded): 以下加密参数为临时写死,后续应迁移至构建期注入或安全配置下发。
|
||||
@@ -251,7 +251,7 @@ export function request(options) {
|
||||
const userId = userIdFromStorage || parseUserIdFromToken(token)
|
||||
const normalizedUrl = rawUrl.startsWith('http')
|
||||
? rawUrl
|
||||
: `${API_BASE}${rawUrl.startsWith('/') ? rawUrl : `/${rawUrl}`}`
|
||||
: `${resolveApiBase()}${rawUrl.startsWith('/') ? rawUrl : `/${rawUrl}`}`
|
||||
const url = appendTimestampQuery(normalizedUrl)
|
||||
const shouldEncrypt = shouldEncryptRequest(rawUrl, userId, options.data)
|
||||
const skipReason = shouldEncrypt ? '' : getEncryptSkipReason(rawUrl, userId, options.data)
|
||||
|
||||
Reference in new issue
Block a user