fix: login temp error

This commit is contained in:
engigu
2026-03-11 11:04:54 +08:00
parent deae554620
commit 0f038f3c0b
3 changed files with 20 additions and 7 deletions
+7 -1
View File
@@ -17,12 +17,18 @@ async function getAuthStatus(force = false): Promise<boolean> {
return isAuth
}
// 重置认证状态(登录/登出时调用)
// 重置认证状态(登出时调用)
export function resetAuthCache() {
authChecked = false
isAuth = false
}
// 直接设置认证状态(登录成功时调用,避免多余请求)
export function setAuthCache(status: boolean) {
authChecked = true
isAuth = status
}
const router = createRouter({
history: createWebHistory(BASE_URL),
routes: [