项目微调

This commit is contained in:
2024-10-11 08:49:31 +08:00
parent 507ea137e4
commit 0cb14955c5
9 changed files with 292 additions and 178 deletions

View File

@@ -41,50 +41,38 @@ export const staticRouter: RouteRecordRaw[] = [
isKeepAlive: false,
},
},
// 错误页面路由
{
path: "/403",
name: "403",
component: () => import("@/components/ErrorMessage/403.vue"),
meta: {
title: "403页面",
},
},
{
path: "/404",
name: "404",
component: () => import("@/components/ErrorMessage/404.vue"),
meta: {
title: "404页面",
},
},
{
path: "/500",
name: "500",
component: () => import("@/components/ErrorMessage/500.vue"),
meta: {
title: "500页面",
},
},
// Resolve refresh page, route warnings
{
path: "/:pathMatch(.*)*",
component: () => import("@/components/ErrorMessage/404.vue"),
},
],
},
],
},
];
/**
* errorRouter (错误页面路由)
*/
export const errorRouter = [
{
path: "/layout",
name: "layout",
component: Layout,
children: [
{
path: "/403",
name: "403",
component: () => import("@/components/ErrorMessage/403.vue"),
meta: {
title: "403页面",
},
},
{
path: "/404",
name: "404",
component: () => import("@/components/ErrorMessage/404.vue"),
meta: {
title: "404页面",
},
},
{
path: "/500",
name: "500",
component: () => import("@/components/ErrorMessage/500.vue"),
meta: {
title: "500页面",
},
},
// Resolve refresh page, route warnings
{
path: "/:pathMatch(.*)*",
component: () => import("@/components/ErrorMessage/404.vue"),
},
],
},
];