From a236819f94e851068eba9130a27f90975b4af131 Mon Sep 17 00:00:00 2001 From: jingna <1264204245@qq.com> Date: Fri, 20 Jun 2025 14:33:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/router/index.ts | 10 +++++----- frontend/src/views/system/userlogin/login.vue | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index a42cd8c..fc5e74a 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -5,7 +5,7 @@ import { useUserStore } from '@/store/user' const routes:any = [ { path: '/', - redirect: '/UserNavbar' + redirect: '/AppFrame' }, // 登录页面路由配置 { @@ -118,11 +118,11 @@ const routes:any = [ } }, { - path: '/UserNavbar', - name: 'UserNavbar', + path: '/AppFrame', + name: 'AppFrame', component: () => import('@/views/system/userlogin/appframe_container.vue'), meta: { - title: '导航', + title: '首页', requiresAuth: true } } @@ -149,7 +149,7 @@ router.beforeEach((to, from, next) => { } else { // 如果已登录且访问登录页,重定向到仪表板 if (to.path === '/UserLogin' && userStore.isAuthenticated) { - next('/UserNavbar') + next('/AppFrame') } else { next() } diff --git a/frontend/src/views/system/userlogin/login.vue b/frontend/src/views/system/userlogin/login.vue index 054c545..ed711e8 100644 --- a/frontend/src/views/system/userlogin/login.vue +++ b/frontend/src/views/system/userlogin/login.vue @@ -57,7 +57,7 @@ const submitForm = async (formEl: FormInstance | undefined) => { localStorage.setItem('permissions', JSON.stringify(res.data.permissions)) ElMessage.success('登录成功') router.push({ - path: '/UserNavbar', + path: '/AppFrame', }) }else{ errormsg.value = res.msg