From 599822cf0a420fb2cffb2c025a12d30c9265770b Mon Sep 17 00:00:00 2001 From: hobby Date: Fri, 29 Aug 2025 07:30:05 +0800 Subject: [PATCH] recover login --- src/pages/login/index.jsx | 2 +- src/routes.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/login/index.jsx b/src/pages/login/index.jsx index 60487ac..e475782 100644 --- a/src/pages/login/index.jsx +++ b/src/pages/login/index.jsx @@ -16,7 +16,7 @@ export default function Login() { React.useEffect(() => { const isLogin = localStorage.getItem('token'); - if (isLogin || window.APP_CONFIG.AUTH_ACCESS === '0') { + if (isLogin) { window.location.href = '/'; // 由于是 Vite 多页面,这里使用 window.location.href } }, []); diff --git a/src/routes.tsx b/src/routes.tsx index a4ab27d..162afa5 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -6,7 +6,7 @@ import AuthGuard from './components/AuthGuard'; export const router = createBrowserRouter([ { - path: '/login2', + path: '/login', element: , }, {