From 253e39d06c799949e471451bc652f53795e53192 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 9 Apr 2025 15:17:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=A7=BB=E5=8A=A8=E7=AB=AF):=20=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E9=93=BE=E6=8E=A5=E5=88=A0=E9=99=A4=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=B9=B6=E7=99=BB=E5=BD=95=E6=8F=90=E7=A4=BA=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/permissionMobile.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core-frontend/src/permissionMobile.ts b/core/core-frontend/src/permissionMobile.ts index a482159a27..a72d486367 100644 --- a/core/core-frontend/src/permissionMobile.ts +++ b/core/core-frontend/src/permissionMobile.ts @@ -7,11 +7,13 @@ import { getRoleRouters } from '@/api/common' import { usePermissionStoreWithOut } from '@/store/modules/permission' import { interactiveStoreWithOut } from '@/store/modules/interactive' import { useAppearanceStoreWithOut } from '@/store/modules/appearance' +import { useLinkStoreWithOut } from '@/store/modules/link' const appearanceStore = useAppearanceStoreWithOut() const permissionStore = usePermissionStoreWithOut() const { wsCache } = useCache() const userStore = useUserStoreWithOut() +const linkStore = useLinkStoreWithOut() const { start, done } = useNProgress() const interactiveStore = interactiveStoreWithOut() @@ -26,6 +28,7 @@ router.beforeEach(async (to, _, next) => { if (to.name === 'link') { next() } else if (wsCache.get('user.token')) { + linkStore.setLinkToken('') if (!userStore.getUid) { await userStore.setUser() } @@ -44,6 +47,7 @@ router.beforeEach(async (to, _, next) => { if (whiteList.includes(to.path) || to.name === 'link') { next() } else { + linkStore.setLinkToken('') next('/login') // 否则全部重定向到登录页 } }