From 5957833a4fd15490c4d67ac2a93504a2d3e75142 Mon Sep 17 00:00:00 2001 From: Soybean Date: Fri, 21 Apr 2023 00:44:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(projects):=20fix=20router=20guide=20[?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC=E5=BC=82?= =?UTF-8?q?=E5=B8=B8]=20fixed=20#216?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/route/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index 589533b8..d3b0e74c 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -107,6 +107,7 @@ export const useRouteStore = defineStore('route-store', { }, /** 初始化动态路由 */ async initDynamicRoute() { + const { resetAuthStore } = useAuthStore(); const { initHomeTab } = useTabStore(); const { userId } = localStg.get('userInfo') || {}; @@ -125,6 +126,8 @@ export const useRouteStore = defineStore('route-store', { initHomeTab(data.home, router); this.isInitAuthRoute = true; + } else { + resetAuthStore(); } }, /** 初始化静态路由 */