feat(app): 启动时添加股票价格监控

- 在 app.go 中添加了 MonitorStockPrices 函数的异步调用
- 修改了前端 App.vue 中的跑马灯效果,包括速度、样式和布局调整
- 更新了 package.json 的 MD5 哈希值
This commit is contained in:
sparkmemory 2025-01-14 23:42:43 +08:00
parent 02bfe4758e
commit 9f7b7b8a64
3 changed files with 8 additions and 8 deletions

1
app.go
View File

@ -80,6 +80,7 @@ func (a *App) domReady(ctx context.Context) {
}() }()
go runtime.EventsEmit(a.ctx, "telegraph", refreshTelegraphList()) go runtime.EventsEmit(a.ctx, "telegraph", refreshTelegraphList())
go MonitorStockPrices(a)
} }
func refreshTelegraphList() *[]string { func refreshTelegraphList() *[]string {

View File

@ -1 +1 @@
00b8e620dca5bab58d37996f0f350d0a fab5f9aa38ff92389d6726864c83c7cd

View File

@ -18,7 +18,7 @@ import {
RefreshOutline, PowerOutline, BarChartOutline, MoveOutline, WalletOutline, StarOutline, RefreshOutline, PowerOutline, BarChartOutline, MoveOutline, WalletOutline, StarOutline,
} from '@vicons/ionicons5' } from '@vicons/ionicons5'
const content = ref('数据来源于网络,仅供参考\n投资有风险,入市需谨慎') const content = ref('数据来源于网络,仅供参考;投资有风险,入市需谨慎')
const isFullscreen = ref(false) const isFullscreen = ref(false)
const activeKey = ref('stock') const activeKey = ref('stock')
const containerRef= ref({}) const containerRef= ref({})
@ -152,19 +152,18 @@ EventsOn("telegraph",(data)=>{
:content="content" :content="content"
cross cross
selectable selectable
:font-size="18" :font-size="16"
:line-height="18" :line-height="16"
:width="500"
:height="400" :height="400"
:width="600"
:x-offset="50" :x-offset="50"
:y-offset="50" :y-offset="150"
:rotate="-15" :rotate="-15"
style="height: 100%"
> >
<n-flex justify="center"> <n-flex justify="center">
<n-grid x-gap="12" :cols="1"> <n-grid x-gap="12" :cols="1">
<n-gi style="position: relative;top:1px;z-index: 19;width: 100%" v-if="telegraph.length>0"> <n-gi style="position: relative;top:1px;z-index: 19;width: 100%" v-if="telegraph.length>0">
<n-marquee :speed="60" > <n-marquee :speed="120" >
<n-tag type="warning" v-for="item in telegraph" style="margin-right: 10px"> <n-tag type="warning" v-for="item in telegraph" style="margin-right: 10px">
{{item}} {{item}}
</n-tag> </n-tag>