This commit is contained in:
owenchen committed 2026-10-14 14:48:29 +08:00
1 parent 8a2adb0a92
commit bd678b0112
22 files changed
+1968 -81

No files matched your search

@@ -69,15 +69,6 @@ export function clearLoginState() {
uni.removeStorageSync(JWT_STORAGE_KEY);
}
/**
* 是否已有登录会话:只认请求层的 AccessToken(令牌唯一来源,与 nav-guard 口径一致)。
* 不在此判过期——AccessToken 过期时请求层会拿 RefreshToken 自动续期,续期失败再 goLogin 退回登录页,
* 所以"登录过"就足以决定冷启动是否直接进 dashboard。
*/
export function hasLoginSession(): boolean {
return !!getJwtInfo()?.AccessToken;
}
function getToken(): string {
return getJwtInfo()?.AccessToken ?? "";
}