diff --git a/orion-visor-ui/src/api/system/setting.ts b/orion-visor-ui/src/api/system/setting.ts index ca55626a..b193c956 100644 --- a/orion-visor-ui/src/api/system/setting.ts +++ b/orion-visor-ui/src/api/system/setting.ts @@ -23,6 +23,7 @@ export interface AppInfoResponse { */ export interface AppReleaseResponse { tagName: string; + releaseTime: string; body: string; } diff --git a/orion-visor-ui/src/views/system/setting/components/about-setting.vue b/orion-visor-ui/src/views/system/setting/components/about-setting.vue index 0bdb2630..b115b5a2 100644 --- a/orion-visor-ui/src/views/system/setting/components/about-setting.vue +++ b/orion-visor-ui/src/views/system/setting/components/about-setting.vue @@ -32,7 +32,11 @@ 新版本已发布, 请及时升级版本 - + + + {{ repo.releaseTime }} + + import type { AppInfoResponse, AppReleaseResponse } from '@/api/system/setting'; - import { onMounted, reactive } from 'vue'; - import { getAppLatestRelease, getSystemAppInfo } from '@/api/system/setting'; + import { onMounted, ref } from 'vue'; import { copy } from '@/hooks/copy'; import useLoading from '@/hooks/loading'; + import { getAppLatestRelease, getSystemAppInfo } from '@/api/system/setting'; const { loading, setLoading } = useLoading(); const webVersion = import.meta.env.VITE_APP_VERSION; - const app = reactive({ + const app = ref({ version: '', uuid: '', }); - const repo = reactive({ + const repo = ref({ tagName: '', + releaseTime: '', body: '', }); @@ -75,8 +80,7 @@ setLoading(true); try { const { data } = await getSystemAppInfo(); - app.version = data.version; - app.uuid = data.uuid; + app.value = data; } catch (e) { } finally { setLoading(false); @@ -87,8 +91,7 @@ onMounted(async () => { try { const { data } = await getAppLatestRelease(); - repo.tagName = data.tagName; - repo.body = data.body; + repo.value = data; } catch (e) { } });