This commit is contained in:
jingna 2025-06-20 14:33:16 +08:00
parent 9cd6f5ab07
commit a236819f94
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ import { useUserStore } from '@/store/user'
const routes:any = [ const routes:any = [
{ {
path: '/', path: '/',
redirect: '/UserNavbar' redirect: '/AppFrame'
}, },
// 登录页面路由配置 // 登录页面路由配置
{ {
@ -118,11 +118,11 @@ const routes:any = [
} }
}, },
{ {
path: '/UserNavbar', path: '/AppFrame',
name: 'UserNavbar', name: 'AppFrame',
component: () => import('@/views/system/userlogin/appframe_container.vue'), component: () => import('@/views/system/userlogin/appframe_container.vue'),
meta: { meta: {
title: '导航', title: '首页',
requiresAuth: true requiresAuth: true
} }
} }
@ -149,7 +149,7 @@ router.beforeEach((to, from, next) => {
} else { } else {
// 如果已登录且访问登录页,重定向到仪表板 // 如果已登录且访问登录页,重定向到仪表板
if (to.path === '/UserLogin' && userStore.isAuthenticated) { if (to.path === '/UserLogin' && userStore.isAuthenticated) {
next('/UserNavbar') next('/AppFrame')
} else { } else {
next() next()
} }

View File

@ -57,7 +57,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
localStorage.setItem('permissions', JSON.stringify(res.data.permissions)) localStorage.setItem('permissions', JSON.stringify(res.data.permissions))
ElMessage.success('登录成功') ElMessage.success('登录成功')
router.push({ router.push({
path: '/UserNavbar', path: '/AppFrame',
}) })
}else{ }else{
errormsg.value = res.msg errormsg.value = res.msg