diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index b10f77d6..1634e3cd 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -1,5 +1,8 @@ import { getSysConf } from '@/api'; -import { CACHE_LOCAL_I18N, CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants'; +import { + CACHE_LOCAL_I18N, + CACHE_SESSION_CRYPTO_API, +} from '@/constants/cache-keys-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { removeToken } from '@/plugins/auth-token'; import { parseUrlPath } from '@/plugins/file-static-url'; @@ -16,11 +19,12 @@ type AppStore = { /**应用版本 */ appVersion: string; - /**服务版本 */ + /**版本号 */ version: string; - buildTime: string; /**系统引导使用 */ bootloader: boolean; + /**服务版本 */ + serverVersion: string; // 用户登录认证 loginAuth: boolean; // 用户接口加密 @@ -54,13 +58,13 @@ const useAppStore = defineStore('app', { appCode: import.meta.env.VITE_APP_CODE, appVersion: import.meta.env.VITE_APP_VERSION, - version: `-`, - buildTime: `-`, + version: '-', bootloader: false, + serverVersion: '-', loginAuth: true, cryptoApi: true, - serialNum: `-`, - copyright: `Copyright ©2023 For ${import.meta.env.VITE_APP_NAME}`, + serialNum: '-', + copyright: `Copyright ©2023-2025 For ${import.meta.env.VITE_APP_NAME}`, logoType: 'icon', filePathIcon: '', filePathBrand: '', @@ -86,7 +90,7 @@ const useAppStore = defineStore('app', { const res = await getSysConf(); if (res.code === RESULT_CODE_SUCCESS && res.data) { this.version = res.data.version; - this.buildTime = res.data.buildTime; + this.serverVersion = res.data.serverVersion; this.bootloader = res.data.bootloader === 'true'; // 引导时 if (this.bootloader) { @@ -94,7 +98,7 @@ const useAppStore = defineStore('app', { } this.loginAuth = res.data.loginAuth !== 'false'; this.cryptoApi = res.data.cryptoApi !== 'false'; - sessionSet(CACHE_SESSION_CRYPTO_API, res.data.cryptoApi); + sessionSet(CACHE_SESSION_CRYPTO_API, res.data.cryptoApi); this.serialNum = res.data.serialNum; this.appName = res.data.title; this.copyright = res.data.copyright;