Skip to content

Commit 2658f20

Browse files
author
spark
committed
feat(frontend):使用内嵌应用图标
- 使用内嵌应用图标替换URL图标 - 添加 GetVersionInfo 函数调用,用于获取版本信息
1 parent 626f99f commit 2658f20

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

frontend/src/components/stock.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
SendDingDingMessage, SendDingDingMessageByType,
99
SetAlarmChangePercent,
1010
SetCostPriceAndVolume, SetStockSort,
11-
UnFollow, GetAIResponseResult
11+
UnFollow, GetAIResponseResult, GetVersionInfo
1212
} from '../../wailsjs/go/main/App'
1313
import {
1414
NAvatar,
@@ -64,6 +64,7 @@ const data = reactive({
6464
openAiEnable: false,
6565
loading: true,
6666
})
67+
const icon = ref('https://raw.githubusercontent.com/ArvinLovegood/go-stock/master/build/appicon.png');
6768
6869
const sortedResults = computed(() => {
6970
//console.log("computed",sortedResults.value)
@@ -112,6 +113,11 @@ onMounted(() => {
112113
data.fenshiURL='http://image.sinajs.cn/newchart/min/n/'+data.code+'.gif'+"?t="+Date.now()
113114
}
114115
}, 3500)
116+
117+
GetVersionInfo().then((res) => {
118+
icon.value = res.icon;
119+
});
120+
115121
})
116122
117123
onBeforeUnmount(() => {
@@ -183,7 +189,7 @@ EventsOn("updateVersion",async (msg) => {
183189
h(NAvatar, {
184190
size: 'small',
185191
round: false,
186-
src: 'https://github.com/ArvinLovegood/go-stock/raw/master/build/appicon.png'
192+
src: icon.value
187193
}),
188194
title: '发现新版本: ' + msg.tag_name,
189195
content: () => {

0 commit comments

Comments
 (0)