Skip to content

Commit 9f7b7b8

Browse files
author
sparkmemory
committed
feat(app): 启动时添加股票价格监控
- 在 app.go 中添加了 MonitorStockPrices 函数的异步调用 - 修改了前端 App.vue 中的跑马灯效果,包括速度、样式和布局调整 - 更新了 package.json 的 MD5 哈希值
1 parent 02bfe47 commit 9f7b7b8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

app.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ func (a *App) domReady(ctx context.Context) {
8080

8181
}()
8282
go runtime.EventsEmit(a.ctx, "telegraph", refreshTelegraphList())
83+
go MonitorStockPrices(a)
8384
}
8485

8586
func refreshTelegraphList() *[]string {

frontend/package.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
00b8e620dca5bab58d37996f0f350d0a
1+
fab5f9aa38ff92389d6726864c83c7cd

frontend/src/App.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
RefreshOutline, PowerOutline, BarChartOutline, MoveOutline, WalletOutline, StarOutline,
1919
} from '@vicons/ionicons5'
2020
21-
const content = ref('数据来源于网络,仅供参考\n投资有风险,入市需谨慎')
21+
const content = ref('数据来源于网络,仅供参考;投资有风险,入市需谨慎')
2222
const isFullscreen = ref(false)
2323
const activeKey = ref('stock')
2424
const containerRef= ref({})
@@ -152,19 +152,18 @@ EventsOn("telegraph",(data)=>{
152152
:content="content"
153153
cross
154154
selectable
155-
:font-size="18"
156-
:line-height="18"
155+
:font-size="16"
156+
:line-height="16"
157+
:width="500"
157158
:height="400"
158-
:width="600"
159159
:x-offset="50"
160-
:y-offset="50"
160+
:y-offset="150"
161161
:rotate="-15"
162-
style="height: 100%"
163162
>
164163
<n-flex justify="center">
165164
<n-grid x-gap="12" :cols="1">
166165
<n-gi style="position: relative;top:1px;z-index: 19;width: 100%" v-if="telegraph.length>0">
167-
<n-marquee :speed="60" >
166+
<n-marquee :speed="120" >
168167
<n-tag type="warning" v-for="item in telegraph" style="margin-right: 10px">
169168
{{item}}
170169
</n-tag>

0 commit comments

Comments
 (0)