From a5cba9ab040f6f97558046885dce3017f9bab7e9 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 11 八月 2026 14:12:29 +0800
Subject: [PATCH] 提交

---
 src/permission.js |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/permission.js b/src/permission.js
index 91b16b0..cdd4f4f 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -15,8 +15,10 @@
   "/register",
   "/wt",
   "/xj",
+  "/SfRelay",
   "/sf",
   "/satisfaction",
+  "/loginSSO",
 ];
 router.beforeEach((to, from, next) => {
   NProgress.start();
@@ -51,12 +53,34 @@
       }
     }
   } else {
-    // 娌℃湁token
-    if (whiteList.indexOf(to.path) !== -1) {
+    let processedPath = to.path;
+    if (to.path.startsWith("/aifollowup")) {
+      processedPath = to.path.replace(/^\/aifollowup/, "") || "/";
+    }
+
+    console.log(processedPath, "澶勭悊鍚庣殑璺緞");
+    console.log(whiteList.indexOf(processedPath), 11);
+
+    if (whiteList.indexOf(processedPath) != -1) {
       // 鍦ㄥ厤鐧诲綍鐧藉悕鍗曪紝鐩存帴杩涘叆
-      next();
+      // 濡傛灉璺緞琚慨鏀逛簡锛岄渶瑕侀噸瀹氬悜
+      if (processedPath !== to.path) {
+        next({
+          path: processedPath,
+          query: to.query,
+          hash: to.hash,
+        });
+        NProgress.done();
+      } else {
+        next();
+      }
     } else {
-      next(`/login?redirect=${to.fullPath}`); // 鍚﹀垯鍏ㄩ儴閲嶅畾鍚戝埌鐧诲綍椤�
+      // 淇濆瓨閲嶅畾鍚慤RL鏃堕渶瑕佸鐞嗚矾寰�
+      const redirectPath = to.path.startsWith("/aifollowup")
+        ? to.path.replace(/^\/aifollowup/, "")
+        : to.fullPath;
+
+      next(`/login?redirect=${redirectPath}`); // 鍚﹀垯鍏ㄩ儴閲嶅畾鍚戝埌鐧诲綍椤�
       NProgress.done();
     }
   }

--
Gitblit v1.9.3