diff --git a/api/core/types/config.go b/api/core/types/config.go index e93a8b9c..0ee5f969 100644 --- a/api/core/types/config.go +++ b/api/core/types/config.go @@ -89,6 +89,7 @@ type BaseConfig struct { MjMode string `json:"mj_mode"` // midjourney 默认的API模式,relax, fast, turbo IndexNavs []int `json:"index_navs"` // 首页显示的导航菜单 + IndexPage string `json:"index_page"` // 首页显示的页面 Copyright string `json:"copyright"` // 版权信息 ICP string `json:"icp"` // ICP 备案号 GaBeian string `json:"ga_beian"` // 公安备案号 diff --git a/web/src/views/Index.vue b/web/src/views/Index.vue index 36b82e4a..0ac510ec 100644 --- a/web/src/views/Index.vue +++ b/web/src/views/Index.vue @@ -123,20 +123,25 @@ const md = new MarkdownIt({ typographer: true, }).use(emoji) -onMounted(() => { - if (isMobile()) { - router.push('/mobile/index') - return - } - getSystemInfo() - .then((res) => { - title.value = res.data.title - logo.value = res.data.logo - }) - .catch((e) => { - ElMessage.error('获取系统配置失败:' + e.message) - }) +if (isMobile()) { + router.push('/mobile/index') +} +getSystemInfo() + .then((res) => { + const data = res.data + title.value = data.title + logo.value = data.logo + console.log(data) + if (data.index_page) { + router.push(data.index_page) + } + }) + .catch((e) => { + ElMessage.error('获取系统配置失败:' + e.message) + }) + +onMounted(() => { getLicenseInfo() .then((res) => { license.value = res.data diff --git a/web/src/views/admin/settings/BasicConfig.vue b/web/src/views/admin/settings/BasicConfig.vue index 875203ae..1a981345 100644 --- a/web/src/views/admin/settings/BasicConfig.vue +++ b/web/src/views/admin/settings/BasicConfig.vue @@ -64,7 +64,53 @@ placeholder="请选择菜单,多选" style="width: 100%" > - + +
+ + +
{{ item.name }}
+
+
+ + + + + + + + +
+ + +
{{ item.name }}
+
+