mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
refactor(update):优化更新检查逻辑
- 修改 CheckUpdate 函数签名,添加 flag 参数 - 根据 flag 参数控制是否显示"当前版本无更新"的通知 - 调整前端按钮点击事件,传递参数 1 给 CheckUpdate 函数 - 优化后端更新检查流程,减少不必要的通知推送
This commit is contained in:
parent
b98f829286
commit
b1a9a8d4d8
1
app.go
1
app.go
@ -478,7 +478,6 @@ func (a *App) CheckStockBaseInfo(ctx context.Context) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
go runtime.EventsEmit(ctx, "loadingMsg", "done")
|
go runtime.EventsEmit(ctx, "loadingMsg", "done")
|
||||||
}()
|
}()
|
||||||
|
|
||||||
stockBasics := &[]data.StockBasic{}
|
stockBasics := &[]data.StockBasic{}
|
||||||
resty.New().R().
|
resty.New().R().
|
||||||
SetHeader("user", "go-stock").
|
SetHeader("user", "go-stock").
|
||||||
|
Loading…
x
Reference in New Issue
Block a user