recover login
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
@@ -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 />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user