fix(前台): 地址打错不再是一整页空白,题目、比赛、题单不存在时写明是哪样不存在、给一个回去的按钮

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-13 22:03:49 +08:00
1 parent f3956ad6a1
commit 06c679579c
6 files changed
+153 -37

No files matched your search

+8
View File
@@ -146,6 +146,14 @@ export const ojs: RouteRecordRaw = {
name: "problemset problem",
meta: { requiresAuth: true },
},
// 兜底:没有它,打错地址是一整页空白,连顶栏都没有。vue-router 按路径具体程度排序,
// 不按注册顺序,所以它吃不掉别的路由;/admin 下打错的也落到这里
{
path: ":pathMatch(.*)*",
name: "not found",
component: () => import("shared/components/NotFound.vue"),
props: { title: "这个页面不存在", hint: "可能是地址打错了,或者这个页面已经下线" },
},
],
}