From 286af19ce9f0c0bff1cad2e1106c4abae72554b0 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期日, 19 四月 2026 15:19:55 +0800
Subject: [PATCH] 测试完成
---
src/permission.js | 30 ++++++++++++++++++++++++++----
1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/permission.js b/src/permission.js
index 91b16b0..b049b44 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -17,6 +17,7 @@
"/xj",
"/sf",
"/satisfaction",
+ "/loginSSO",
];
router.beforeEach((to, from, next) => {
NProgress.start();
@@ -51,12 +52,33 @@
}
}
} 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, "澶勭悊鍚庣殑璺緞");
+
+ 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