recover login

This commit is contained in:
hobby
2025-08-29 07:30:05 +08:00
parent 2dde9b15e9
commit 599822cf0a
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ export default function Login() {
React.useEffect(() => { React.useEffect(() => {
const isLogin = localStorage.getItem('token'); const isLogin = localStorage.getItem('token');
if (isLogin || window.APP_CONFIG.AUTH_ACCESS === '0') { if (isLogin) {
window.location.href = '/'; // 由于是 Vite 多页面,这里使用 window.location.href window.location.href = '/'; // 由于是 Vite 多页面,这里使用 window.location.href
} }
}, []); }, []);

View File

@@ -6,7 +6,7 @@ import AuthGuard from './components/AuthGuard';
export const router = createBrowserRouter([ export const router = createBrowserRouter([
{ {
path: '/login2', path: '/login',
element: <Login />, element: <Login />,
}, },
{ {