From 83af3dd309889489f541fc8e21894c9f79e5788c Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期五, 22 八月 2025 16:09:58 +0800
Subject: [PATCH] 用户管理

---
 src/router/index.ts |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/router/index.ts b/src/router/index.ts
index a4d8e99..5b3f172 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -107,7 +107,7 @@
 
 /** 璺敱鐧藉悕鍗� */
 const whiteList = ["/login"];
-const noLoginList = ["/index", "/register", "/registersucess"];
+const noLoginList = ["/index", "/register", "/registernav", "/registersucess"];
 // const whiteList = [];
 
 const { VITE_HIDE_HOME } = import.meta.env;
@@ -128,7 +128,7 @@
       if (!item.meta.title) return "";
       const Title = getConfig().Title;
       if (Title) document.title = `${item.meta.title} | ${Title}`;
-      else document.title = item.meta.title as string;
+      else document.title = item.meta.title;
     });
   }
   /** 濡傛灉宸茬粡鐧诲綍骞跺瓨鍦ㄧ櫥褰曚俊鎭悗涓嶈兘璺宠浆鍒拌矾鐢辩櫧鍚嶅崟锛岃�屾槸缁х画淇濇寔鍦ㄥ綋鍓嶉〉闈� */
@@ -194,16 +194,11 @@
     }
   } else {
     if (to.path !== "/login") {
-      if (whiteList.indexOf(to.path) !== -1) {
-        console.log(to.path, "====1", noLoginList.indexOf(to.path));
+      if (noLoginList.indexOf(to.path) !== -1) {
         next();
       } else {
-        // if (noLoginList.indexOf(to.path) == -1) {
-        next();
-        // } else {
-        //   removeToken();
-        //   next({ path: "/login" });
-        // }
+        removeToken();
+        next({ path: "/index" });
       }
     } else {
       next();

--
Gitblit v1.9.1