This commit is contained in:
2025-03-10 19:01:21 +08:00
parent 94644d0601
commit 31a2667f8b
28 changed files with 1370 additions and 57 deletions

View File

@@ -1,6 +1,7 @@
import {createRouter, createWebHashHistory} from 'vue-router';
import routes from "./routes.js";
import {useUserStore} from "../pinia/UserStore/index.js";
import {useSystemStore} from "../pinia/SystemStore/index.js";
const router = createRouter({
history: createWebHashHistory(),
@@ -9,6 +10,7 @@ const router = createRouter({
router.beforeEach((to, from, next) => {
const {isLogin} = useUserStore();
const SystemStore = useSystemStore();
if (!isLogin && !to.path.includes('loginSYS')) {
next({ path: '/loginSYS' });