This commit is contained in:
2025-02-28 09:56:01 +08:00
parent 3118d0c397
commit 7ee9396255
13 changed files with 376 additions and 51 deletions

View File

@@ -9,8 +9,9 @@ const router = createRouter({
router.beforeEach((to, from, next) => {
const {isLogin} = useUserStore();
if (to.name !== 'login' && !isLogin) {
next({name: 'login'});
if (!isLogin && !to.path.includes('loginSYS')) {
next({ path: '/loginSYS' });
} else {
next();
}

View File

@@ -9,9 +9,27 @@ const routes = [
component: () => import('../pages/layout/index.vue'),
},
{
path: '/login',
name: 'login',
path: '/loginSYS',
name: 'loginSYS',
redirect: '/loginSYS/login',
component: () => import('../pages/login/index.vue'),
children: [
{
path: 'login',
name: 'login',
component: () => import('../pages/login/Login.vue')
},
{
path: 'register',
name: 'register',
component: () => import('../pages/login/Register.vue')
},
{
path: 'forgot',
name: 'forgot',
component: () => import('../pages/login/Forgot.vue')
}
]
},
]