bugfix:loginfiled

This commit is contained in:
2026-09-13 01:27:21 +08:00
parent f897e1a391
commit b1a664a768
9 changed files with 128 additions and 11 deletions
+3 -2
View File
@@ -174,9 +174,10 @@ export function request<T = any>(options: RequestOptions): Promise<T> {
doCall()
return
}
auth.clearTokens()
// 非关键请求(红点轮询等)静默失败,不打断用户当前页面
// 非关键请求(红点轮询、额度展示等)静默失败:
// 只 reject,不动登录态、不跳转,避免把已登录用户悄悄踢成未登录
if (!silentAuth) {
auth.clearTokens()
handleAuthExpired()
if (showError) showToast('登录已过期,请重新登录')
}