u
This commit is contained in:
1 parent
c7240ea7c9
commit
189a085353
26 files changed
+2650
-201
No files matched your search
@@ -19,11 +19,19 @@ router.beforeEach(async (to) => {
|
||||
const userStore = useUserStore();
|
||||
const permissionStore = usePermissionStore();
|
||||
|
||||
if (to.path === "/login") {
|
||||
if (userStore.isLogined()) {
|
||||
return "/";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!userStore.isLogined() && to.path !== "/login") {
|
||||
ElMessage.warning("登录已过期,请先登录");
|
||||
return "/login";
|
||||
}
|
||||
|
||||
// 检查权限
|
||||
if (to.meta.moduleId) {
|
||||
await permissionStore.init();
|
||||
|
||||
@@ -35,6 +43,7 @@ router.beforeEach(async (to) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 处理 tab 页路径
|
||||
handleTabPath(to);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -68,6 +68,22 @@ export const routes = [
|
||||
moduleId: "s_awokemodule",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/system/log/data",
|
||||
component: () => import("@/views/system/log/data.vue"),
|
||||
meta: {
|
||||
title: "数据日志",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/system/log/login",
|
||||
component: () => import("@/views/system/log/login.vue"),
|
||||
meta: {
|
||||
title: "登录日志",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
// ==================== 个人中心 ====================
|
||||
{
|
||||
path: "/user-center",
|
||||
|
||||
Reference in new issue
Block a user