https 替换

This commit is contained in:
2025-12-27 17:34:19 +08:00
parent 55801fa0ec
commit 0fb7a4ffb2
18 changed files with 233 additions and 293 deletions

View File

@@ -225,7 +225,7 @@ const handleUserCommand = (command: string) => {
case 'logout':
localStorage.clear()
ElMessage.success('退出成功')
router.push('/login')
router.push('/platform/login')
break
}
}

View File

@@ -243,7 +243,7 @@ const handleUserCommand = (command: string) => {
case 'logout':
localStorage.clear()
ElMessage.success('退出成功')
router.push('/login')
router.push('/platform/login')
break
}
}

View File

@@ -5,7 +5,7 @@ import { loadRoutesFromStorage } from './dynamicRoute'
// platform应用的动态路由会根据layout字段自动添加不需要预定义Root布局
const routes: RouteRecordRaw[] = [
{
path: '/login',
path: '/platform/login',
name: 'Login',
component: () => import('@/views/public/Login/Login.vue'),
meta: {
@@ -37,13 +37,13 @@ router.beforeEach((to, from, next) => {
if (requiresAuth && !hasToken) {
// 需要登录但未登录,跳转到登录页
next({
path: '/login',
path: '/platform/login',
query: { redirect: to.fullPath } // 保存原始路径
})
return
}
if (to.path === '/login' && hasToken) {
if (to.path === '/platform/login' && hasToken) {
// 已登录但访问登录页,跳转到首页
next('/')
return