mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 添加exception页面:403,404,500
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import { BasicLayout, BlankLayout } from '@/layouts';
|
||||
import { BasicLayout, BlankLayout, BlankChildLayout } from '@/layouts';
|
||||
import { EnumRoutePaths } from '@/enum';
|
||||
|
||||
type RouteKey = keyof typeof EnumRoutePaths;
|
||||
@ -22,25 +22,37 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
name: RouteNameMap.get('login'),
|
||||
path: EnumRoutePaths.login,
|
||||
component: () => import('@/views/system/login/index.vue')
|
||||
component: () => import('@/views/system/login/index.vue'),
|
||||
meta: {
|
||||
fullPage: true
|
||||
}
|
||||
},
|
||||
// 404
|
||||
{
|
||||
name: RouteNameMap.get('not-found'),
|
||||
path: EnumRoutePaths['not-found'],
|
||||
component: () => import('@/views/system/exception/404.vue')
|
||||
component: () => import('@/views/system/exception/404.vue'),
|
||||
meta: {
|
||||
fullPage: true
|
||||
}
|
||||
},
|
||||
// 403
|
||||
{
|
||||
name: RouteNameMap.get('no-permission'),
|
||||
path: EnumRoutePaths['no-permission'],
|
||||
component: () => import('@/views/system/exception/403.vue')
|
||||
component: () => import('@/views/system/exception/403.vue'),
|
||||
meta: {
|
||||
fullPage: true
|
||||
}
|
||||
},
|
||||
// 500
|
||||
{
|
||||
name: RouteNameMap.get('service-error'),
|
||||
path: EnumRoutePaths['service-error'],
|
||||
component: () => import('@/views/system/exception/500.vue')
|
||||
component: () => import('@/views/system/exception/500.vue'),
|
||||
meta: {
|
||||
fullPage: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -58,13 +70,47 @@ export const customRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
name: 'root',
|
||||
path: '/',
|
||||
redirect: '/home',
|
||||
redirect: { name: RouteNameMap.get('dashboard-analysis') },
|
||||
component: BasicLayout,
|
||||
children: [
|
||||
{
|
||||
name: 'home',
|
||||
path: '/home',
|
||||
component: () => import('@/views/home/index.vue')
|
||||
name: 'dashboard',
|
||||
path: '/dashboard',
|
||||
component: BlankChildLayout,
|
||||
children: [
|
||||
{
|
||||
name: RouteNameMap.get('dashboard-analysis'),
|
||||
path: EnumRoutePaths['dashboard-analysis'],
|
||||
component: () => import('@/views/dashboard/analysis/index.vue')
|
||||
},
|
||||
{
|
||||
name: RouteNameMap.get('dashboard-workbench'),
|
||||
path: EnumRoutePaths['dashboard-workbench'],
|
||||
component: () => import('@/views/dashboard/workbench/index.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'exception',
|
||||
path: '/exception',
|
||||
component: BlankChildLayout,
|
||||
children: [
|
||||
{
|
||||
name: RouteNameMap.get('exception-403'),
|
||||
path: EnumRoutePaths['exception-403'],
|
||||
component: () => import('@/views/system/exception/403.vue')
|
||||
},
|
||||
{
|
||||
name: RouteNameMap.get('exception-404'),
|
||||
path: EnumRoutePaths['exception-404'],
|
||||
component: () => import('@/views/system/exception/404.vue')
|
||||
},
|
||||
{
|
||||
name: RouteNameMap.get('exception-500'),
|
||||
path: EnumRoutePaths['exception-500'],
|
||||
component: () => import('@/views/system/exception/500.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user