mirror of
https://github.com/certd/certd.git
synced 2026-05-17 13:57:31 +08:00
perf(设置): 添加首页启用开关配置
在系统设置中添加首页启用开关配置项,包括前端路由守卫检查、多语言支持和表单配置,以控制是否显示首页
This commit is contained in:
@@ -47,6 +47,13 @@ export function setupCommonGuard(router: Router) {
|
||||
const settingStore = useSettingStore();
|
||||
await settingStore.initOnce();
|
||||
|
||||
if (to.path === "/" && settingStore.sysPublic?.homePageEnabled === false) {
|
||||
return {
|
||||
path: DEFAULT_HOME_PATH,
|
||||
replace: true,
|
||||
};
|
||||
}
|
||||
|
||||
to.meta.loaded = loadedPaths.has(to.path);
|
||||
|
||||
// 页面加载进度条
|
||||
|
||||
Reference in New Issue
Block a user