From a67e54ca6e89d0c49e79bc135c7f301ec6600a39 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Wed, 16 Oct 2024 14:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 1 + src/i18n/locales/zh-CN.ts | 1 + src/views/index.vue | 4 ++-- src/views/system/setting/components/change-home-index.vue | 6 ++---- src/views/system/setting/index.vue | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 85e8a6e6..4f03752d 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -1785,6 +1785,7 @@ export default { homeInstruction:'Set the system home page', home: 'System home page', homeTip:'Do you want to submit the current interface as the system interface?', + homeSet:'System home page Settings', }, role:{ allScopeOptions:'All data permissions', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index ea105c1b..77cd7b64 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -1785,6 +1785,7 @@ export default { homeInstruction:'设置系统首页界面', home: '系统首页', homeTip:'确认要提交当前界面为系统界面吗?', + homeSet:'系统首页设置', }, role:{ allScopeOptions:'全部数据权限', diff --git a/src/views/index.vue b/src/views/index.vue index bdd3c73b..e9baa113 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -8,7 +8,7 @@ import { reactive, } from 'vue'; import { listMenu } from '@/api/system/menu'; -import { getConfig, changeValue } from '@/api/system/config'; +import { getConfig, getConfigKey,changeValue } from '@/api/system/config'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { message } from 'ant-design-vue'; @@ -19,7 +19,7 @@ const currentComponent = shallowRef( onMounted(() => { //获取当前系统设置的首页路径 111为configID - getConfig(111).then(res => { + getConfigKey('sys.homePage').then(res => { if (res.code === RESULT_CODE_SUCCESS && res.data) { if (res.data.configValue) { currentComponent.value = defineAsyncComponent( diff --git a/src/views/system/setting/components/change-home-index.vue b/src/views/system/setting/components/change-home-index.vue index a25fbefe..d16c1e5e 100644 --- a/src/views/system/setting/components/change-home-index.vue +++ b/src/views/system/setting/components/change-home-index.vue @@ -3,11 +3,9 @@ import { Modal, message } from 'ant-design-vue/lib'; import { onMounted, reactive, toRaw } from 'vue'; import useAppStore from '@/store/modules/app'; import useI18n from '@/hooks/useI18n'; -import { CACHE_LOCAL_I18N } from '@/constants/cache-keys-constants'; -import { localSet } from '@/utils/cache-local-utils'; import { listMenu } from '@/api/system/menu'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; -import { getConfig, changeValue } from '@/api/system/config'; +import { getConfig, getConfigKey, changeValue } from '@/api/system/config'; const appStore = useAppStore(); const { t, optionsLocale } = useI18n(); @@ -69,7 +67,7 @@ onMounted(() => { }); //获取当前系统设置的首页路径 111为configID - getConfig(111).then(res => { + getConfigKey('sys.homePage').then(res => { if (res.code === RESULT_CODE_SUCCESS && res.data) { state.default = res.data.configValue; } diff --git a/src/views/system/setting/index.vue b/src/views/system/setting/index.vue index 8b8de721..0699e558 100644 --- a/src/views/system/setting/index.vue +++ b/src/views/system/setting/index.vue @@ -51,7 +51,7 @@ const { t } = useI18n(); - 系统首页设置 + {{t('views.system.setting.homeSet') }}