From 7981c8b76ea5708bfb75b59fcd65252e72ed72f3 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 20 十月 2026 14:09:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_江苏商贸供销社' into dev_江苏商贸供销社

---
 src/router/guard.ts |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/router/guard.ts b/src/router/guard.ts
index 8b88c83..960a44a 100644
--- a/src/router/guard.ts
+++ b/src/router/guard.ts
@@ -56,12 +56,14 @@
     const dictStore = useDictStore();
 
     // 鍩烘湰璺敱锛岃繖浜涜矾鐢变笉闇�瑕佽繘鍏ユ潈闄愭嫤鎴�
-    if (coreRouteNames.includes(to.name as string)) {
+    // Personal settings are available to every signed-in account and still
+    // pass through token validation and user/menu initialization below.
+    if (to.name === 'Profile') to.meta.fullPathKey = false;
+    if (coreRouteNames.includes(to.name as string) && to.name !== 'Profile') {
       if (to.path === LOGIN_PATH && accessStore.accessToken) {
         return decodeURIComponent(
           (to.query?.redirect as string) ||
-            userStore.userInfo?.homePath ||
-            preferences.app.defaultHomePath,
+            '/analytics',
         );
       }
       return true;
@@ -132,7 +134,7 @@
     userStore.setUserRoles(userRoles);
     const redirectPath = (from.query.redirect ??
       (to.path === preferences.app.defaultHomePath
-        ? userInfo?.homePath || preferences.app.defaultHomePath
+        ? '/analytics'
         : to.fullPath)) as string;
 
     return {

--
Gitblit v1.9.3