diff --git a/JC-Salon-Frontend/src/router/index.ts b/JC-Salon-Frontend/src/router/index.ts index 7726cda6..4670683b 100644 --- a/JC-Salon-Frontend/src/router/index.ts +++ b/JC-Salon-Frontend/src/router/index.ts @@ -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 }) diff --git a/JC-Salon-Frontend/src/views/NotFoundView.vue b/JC-Salon-Frontend/src/views/NotFoundView.vue index 49a083ed..da138b88 100644 --- a/JC-Salon-Frontend/src/views/NotFoundView.vue +++ b/JC-Salon-Frontend/src/views/NotFoundView.vue @@ -12,11 +12,11 @@ {{ BRAND_CONFIG.appName }}
您访问的页面不存在或已被删除,我们带您回到首页继续浏览作品。
+您访问的页面不存在或已被删除,我们将在 5 秒后返回上一页。
-