diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index 71c7bcd3..d623ce23 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -14,6 +14,9 @@ type AppStore = { /**应用版本 */ appVersion: string; + /**服务版本 */ + version: string, + buildTime: string, /**应用版权声明 */ copyright: string; /**LOGO显示类型 */ @@ -41,6 +44,8 @@ const useAppStore = defineStore('app', { appCode: import.meta.env.VITE_APP_CODE, appVersion: import.meta.env.VITE_APP_VERSION, + version: `-`, + buildTime: `-`, copyright: `Copyright ©2023 For ${import.meta.env.VITE_APP_NAME}`, logoType: 'icon', filePathIcon: '', @@ -70,6 +75,8 @@ const useAppStore = defineStore('app', { async fnSysConf() { const res = await getSysConf(); if (res.code === RESULT_CODE_SUCCESS && res.data) { + this.version = res.data.version; + this.buildTime = res.data.buildTime; this.appName = res.data.title; this.copyright = res.data.copyright; this.logoType = res.data.logoType; diff --git a/src/views/index.vue b/src/views/index.vue index c5f1cf3e..81f03cd2 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -106,7 +106,7 @@ let tableState: TabeStateType = reactive({ /**表格状态 */ let nfInfo: any = reactive({ obj: 'OMC', - version: '2.2312.9', + version: appStore.version, status: t('views.index.normal'), number: '', outTimeDate: '',