mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
update
This commit is contained in:
parent
1ab6875790
commit
cf7e8415e6
17
app.go
17
app.go
@ -5,7 +5,6 @@ import (
|
|||||||
"github.com/wailsapp/wails/v2/pkg/runtime"
|
"github.com/wailsapp/wails/v2/pkg/runtime"
|
||||||
"go-stock/backend/data"
|
"go-stock/backend/data"
|
||||||
"go-stock/backend/logger"
|
"go-stock/backend/logger"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// App struct
|
// App struct
|
||||||
@ -27,14 +26,14 @@ func (a *App) startup(ctx context.Context) {
|
|||||||
// domReady is called after front-end resources have been loaded
|
// domReady is called after front-end resources have been loaded
|
||||||
func (a *App) domReady(ctx context.Context) {
|
func (a *App) domReady(ctx context.Context) {
|
||||||
// Add your action here
|
// Add your action here
|
||||||
ticker := time.NewTicker(time.Second)
|
//ticker := time.NewTicker(time.Second)
|
||||||
defer ticker.Stop()
|
//defer ticker.Stop()
|
||||||
//定时更新数据
|
////定时更新数据
|
||||||
go func() {
|
//go func() {
|
||||||
for range ticker.C {
|
// for range ticker.C {
|
||||||
runtime.WindowSetTitle(ctx, "go-stock "+time.Now().Format("2006-01-02 15:04:05"))
|
// runtime.WindowSetTitle(ctx, "go-stock "+time.Now().Format("2006-01-02 15:04:05"))
|
||||||
}
|
// }
|
||||||
}()
|
//}()
|
||||||
}
|
}
|
||||||
|
|
||||||
// beforeClose is called when the application is about to quit,
|
// beforeClose is called when the application is about to quit,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user