This commit is contained in:
zlwu committed 2026-05-24 08:34:01 +08:00
1 parent ea5dedf059
commit 07ed8c7a60
92 files changed
+808 -336

No files matched your search

+1 -1
View File
@@ -228,7 +228,7 @@ function isStaticRoute(path: string): boolean {
return routes.some((route) => {
// 404 catch-all 路由不应视为可匿名访问的静态页,
// 否则未登录时手动输入任意地址会直接落到 404,无法跳转登录页。
if (route.name === 'Exception404') {
if (route.name === 'Exception404CatchAll') {
return false
}
+2 -2
View File
@@ -10,7 +10,7 @@ export const exceptionRoutes: AppRouteRecord = {
},
children: [
{
path: '403',
path: '300',
name: 'Exception403',
component: '/exception/403/index',
meta: {
@@ -21,7 +21,7 @@ export const exceptionRoutes: AppRouteRecord = {
}
},
{
path: '404',
path: '400',
name: 'Exception404',
component: '/exception/404/index',
meta: {
+16 -10
View File
@@ -11,13 +11,6 @@ import { AppRouteRecordRaw } from '@/utils/router'
* 2、静态路由不管是否登录都可以访问
*/
export const staticRoutes: AppRouteRecordRaw[] = [
// 不需要登录就能访问的路由示例
// {
// path: '/welcome',
// name: 'WelcomeStatic',
// component: () => import('@views/dashboard/console/index.vue'),
// meta: { title: 'menus.dashboard.title' }
// },
{
path: '/auth/login',
name: 'Login',
@@ -25,13 +18,13 @@ export const staticRoutes: AppRouteRecordRaw[] = [
meta: { title: 'menus.login.title', isHideTab: true }
},
{
path: '/403',
path: '/300',
name: 'Exception403',
component: () => import('@views/exception/403/index.vue'),
meta: { title: '403', isHideTab: true }
},
{
path: '/:pathMatch(.*)*',
path: '/400',
name: 'Exception404',
component: () => import('@views/exception/404/index.vue'),
meta: { title: '404', isHideTab: true }
@@ -42,13 +35,20 @@ export const staticRoutes: AppRouteRecordRaw[] = [
component: () => import('@views/exception/500/index.vue'),
meta: { title: '500', isHideTab: true }
},
{
path: '/403',
redirect: '/300'
},
{
path: '/404',
redirect: '/400'
},
{
path: '/outside',
component: () => import('@views/index/index.vue'),
name: 'Outside',
meta: { title: 'menus.outside.title' },
children: [
// iframe 内嵌页面
{
path: '/outside/iframe/:path',
name: 'Iframe',
@@ -56,5 +56,11 @@ export const staticRoutes: AppRouteRecordRaw[] = [
meta: { title: 'iframe' }
}
]
},
{
path: '/:pathMatch(.*)*',
name: 'Exception404CatchAll',
component: () => import('@views/exception/404/index.vue'),
meta: { title: '404', isHideTab: true }
}
]