From 2658f207dc1e6d51d1014b1941562b40e3f0202c Mon Sep 17 00:00:00 2001 From: spark Date: Sun, 9 Feb 2025 16:26:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E4=BD=BF=E7=94=A8=E5=86=85?= =?UTF-8?q?=E5=B5=8C=E5=BA=94=E7=94=A8=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用内嵌应用图标替换URL图标 - 添加 GetVersionInfo 函数调用,用于获取版本信息 --- frontend/src/components/stock.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/stock.vue b/frontend/src/components/stock.vue index 03b2051..caf9018 100644 --- a/frontend/src/components/stock.vue +++ b/frontend/src/components/stock.vue @@ -8,7 +8,7 @@ import { SendDingDingMessage, SendDingDingMessageByType, SetAlarmChangePercent, SetCostPriceAndVolume, SetStockSort, - UnFollow, GetAIResponseResult + UnFollow, GetAIResponseResult, GetVersionInfo } from '../../wailsjs/go/main/App' import { NAvatar, @@ -64,6 +64,7 @@ const data = reactive({ openAiEnable: false, loading: true, }) +const icon = ref('https://raw.githubusercontent.com/ArvinLovegood/go-stock/master/build/appicon.png'); const sortedResults = computed(() => { //console.log("computed",sortedResults.value) @@ -112,6 +113,11 @@ onMounted(() => { data.fenshiURL='http://image.sinajs.cn/newchart/min/n/'+data.code+'.gif'+"?t="+Date.now() } }, 3500) + + GetVersionInfo().then((res) => { + icon.value = res.icon; + }); + }) onBeforeUnmount(() => { @@ -183,7 +189,7 @@ EventsOn("updateVersion",async (msg) => { h(NAvatar, { size: 'small', round: false, - src: 'https://github.com/ArvinLovegood/go-stock/raw/master/build/appicon.png' + src: icon.value }), title: '发现新版本: ' + msg.tag_name, content: () => {