修复网页端未知路径跳转逻辑
This commit is contained in:
@@ -14,6 +14,7 @@ const pageNames = [
|
||||
] as const
|
||||
|
||||
const routes = [
|
||||
{ path: '/', redirect: '/admin' },
|
||||
{ path: '/admin/login', name: 'admin-login', component: () => import('../views/admin/AdminLoginView.vue'), meta: { requiresAuth: false, isAdmin: true, hideNav: true } },
|
||||
{
|
||||
path: '/admin', component: () => import('../views/admin/AdminLayout.vue'), meta: { requiresAuth: true, isAdmin: true, hideNav: true },
|
||||
@@ -21,7 +22,7 @@ const routes = [
|
||||
path, name, component: () => import(`../views/admin/${view}.vue`), meta: { requiresAuth: true, isAdmin: true, hideNav: true, permissionCode }
|
||||
}))
|
||||
},
|
||||
{ path: '/:pathMatch(.*)*', name: 'not-found', component: () => import('../views/NotFoundView.vue'), meta: { requiresAuth: false, isAdmin: true, hideNav: true } }
|
||||
{ path: '/:pathMatch(.*)*', name: 'not-found', component: () => import('../views/NotFoundView.vue'), meta: { requiresAuth: false, isAdmin: false, hideNav: true } }
|
||||
]
|
||||
|
||||
const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes })
|
||||
|
||||
Reference in New Issue
Block a user