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 = [
{
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()
}

View File

@ -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