This commit is contained in:
2026-04-21 19:17:31 +08:00
parent d234d27cc0
commit 89129ef1f4
83 changed files with 13329 additions and 176 deletions

View File

@@ -518,7 +518,8 @@ export async function fetchWithApiAuth(
} catch {
clearStoredAccessToken();
}
} else if (response.status === 401) {
} else if (response.status === 401 && hasAuthHeader && !options.skipAuth) {
// 公开只读请求不能因为服务端异常 401 顺手把正式登录态清空。
clearStoredAccessToken();
}