修复网页端未知路径跳转逻辑

This commit is contained in:
2026-09-05 23:37:13 +08:00
parent 9ac56115d0
commit 852a715722
2 changed files with 14 additions and 9 deletions
+2 -1
View File
@@ -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 })