update
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user