This commit is contained in:
owenchen committed 2026-09-03 08:04:24 +08:00
1 parent 7d8ec5ce99
commit 7817c5374c
11 files changed
+248 -84

No files matched your search

+17
View File
@@ -63,6 +63,23 @@ export async function setupRouter(app: App) {
},
});
}
// 错误页路由:地址不存在(拼错 / 菜单里没有)时统一跳到 404,不再白屏
router.addRoute({
path: "/error/page403",
name: "page403",
component: () => import("@/views/error/page403.vue"),
props: true,
meta: {
title: "页面不存在403",
},
});
// catch-all 必须最后注册,匹配所有未定义路径
router.addRoute({
path: "/:pathMatch(.*)*",
redirect: "/error/page403",
});
app.use(router);
}
export default router;
@@ -88,6 +88,15 @@ class LocaleService{
)
};
async Copy() {
return request<any>(
{
url: "/Locale/Copy",
method: "get",
}
)
};
}
const localeService= new LocaleService();
+1 -1
View File
@@ -1,2 +1,2 @@
<template>error 403</template>
<template>error 404</template>
<script setup lang="ts"> </script>
+1 -1
View File
@@ -20,7 +20,7 @@
<a-button type="primary" html-type="submit" size="large" block> {{ t('login.login.login')}} </a-button>
</a-form-item>
<!-- 技术上已实现,暂时不加入中文系统 -->
<div class="culture-switch" v-if="true">
<div class="culture-switch" v-if="false">
<a-button
type="text"
size="large"