mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 01:06:39 +08:00
refactor(ui): 无权限页面调整
This commit is contained in:
parent
1ee1a8d6d9
commit
e76b49afd2
@ -10,11 +10,6 @@ const whiteListRoutes = [
|
||||
name: "Login",
|
||||
component: () => import("@/views/LoginView.vue"),
|
||||
},
|
||||
{
|
||||
path: "/403",
|
||||
name: "403",
|
||||
component: () => import("@/views/NoPermission.vue"),
|
||||
},
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
name: "404",
|
||||
@ -30,13 +25,20 @@ const router = createRouter({
|
||||
name: 'home',
|
||||
component: CustomLayout,
|
||||
redirect: () => menu[0].path,
|
||||
children: menu
|
||||
children: [
|
||||
{
|
||||
path: "403",
|
||||
name: "403",
|
||||
component: () => import("@/views/NoPermission.vue"),
|
||||
},
|
||||
...menu
|
||||
]
|
||||
},
|
||||
...whiteListRoutes
|
||||
]
|
||||
})
|
||||
|
||||
const whiteList = whiteListRoutes.map((i) => i.name);
|
||||
const whiteList = [...whiteListRoutes.map((i) => i.name), "403"];
|
||||
|
||||
router.beforeEach((to, _, next) => {
|
||||
const authStore = useAuthStore();
|
||||
|
Loading…
Reference in New Issue
Block a user