feat(frontend):使用内嵌应用图标

- 使用内嵌应用图标替换URL图标
- 添加 GetVersionInfo 函数调用,用于获取版本信息
This commit is contained in:
spark 2025-02-09 16:26:20 +08:00
parent 626f99f0d1
commit 2658f207dc

View File

@ -8,7 +8,7 @@ import {
SendDingDingMessage, SendDingDingMessageByType, SendDingDingMessage, SendDingDingMessageByType,
SetAlarmChangePercent, SetAlarmChangePercent,
SetCostPriceAndVolume, SetStockSort, SetCostPriceAndVolume, SetStockSort,
UnFollow, GetAIResponseResult UnFollow, GetAIResponseResult, GetVersionInfo
} from '../../wailsjs/go/main/App' } from '../../wailsjs/go/main/App'
import { import {
NAvatar, NAvatar,
@ -64,6 +64,7 @@ const data = reactive({
openAiEnable: false, openAiEnable: false,
loading: true, loading: true,
}) })
const icon = ref('https://raw.githubusercontent.com/ArvinLovegood/go-stock/master/build/appicon.png');
const sortedResults = computed(() => { const sortedResults = computed(() => {
//console.log("computed",sortedResults.value) //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() data.fenshiURL='http://image.sinajs.cn/newchart/min/n/'+data.code+'.gif'+"?t="+Date.now()
} }
}, 3500) }, 3500)
GetVersionInfo().then((res) => {
icon.value = res.icon;
});
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
@ -183,7 +189,7 @@ EventsOn("updateVersion",async (msg) => {
h(NAvatar, { h(NAvatar, {
size: 'small', size: 'small',
round: false, round: false,
src: 'https://github.com/ArvinLovegood/go-stock/raw/master/build/appicon.png' src: icon.value
}), }),
title: '发现新版本: ' + msg.tag_name, title: '发现新版本: ' + msg.tag_name,
content: () => { content: () => {