From cedff896bbcc7c91788ddfcd7c7e6631a1b97ea7 Mon Sep 17 00:00:00 2001 From: ArvinLovegood Date: Thu, 24 Apr 2025 22:19:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor(frontend):=E8=B0=83=E6=95=B4K=E7=BA=BF?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E8=AE=B0=E7=82=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉 KLineChart.vue 中的 markPoint.symbol属性,以修改标记点的显示方式 - 在 main.go 中: - 移除初始化股票数据的冗余注释代码 - 保留获取屏幕分辨率的代码并修复缩进 -调整应用程序窗口的最小高度 --- frontend/src/components/KLineChart.vue | 2 +- main.go | 50 +++++++++++++------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/KLineChart.vue b/frontend/src/components/KLineChart.vue index ed5c039..105eeea 100644 --- a/frontend/src/components/KLineChart.vue +++ b/frontend/src/components/KLineChart.vue @@ -225,7 +225,7 @@ function handleKLine(code,name){ // borderColor0: downBorderColor }, markPoint: { - symbol: 'none', + //symbol: 'none', label: { formatter: function (param) { return param != null ? param.value + '' : ''; diff --git a/main.go b/main.go index 59c2ff6..ab20c06 100644 --- a/main.go +++ b/main.go @@ -77,20 +77,20 @@ func main() { // Sort: 0, //}) - //if stocksBin != nil && len(stocksBin) > 0 { - // go initStockData() - //} - //log.SugaredLogger.Infof("init stocksBinHK %d", len(stocksBinHK)) - // - //if stocksBinHK != nil && len(stocksBinHK) > 0 { - // go initStockDataHK() - //} - //log.SugaredLogger.Infof("init stocksBinUS %d", len(stocksBinUS)) - // - //if stocksBinUS != nil && len(stocksBinUS) > 0 { - // go initStockDataUS() - //} - //updateBasicInfo() + if stocksBin != nil && len(stocksBin) > 0 { + go initStockData() + } + log.SugaredLogger.Infof("init stocksBinHK %d", len(stocksBinHK)) + + if stocksBinHK != nil && len(stocksBinHK) > 0 { + go initStockDataHK() + } + log.SugaredLogger.Infof("init stocksBinUS %d", len(stocksBinUS)) + + if stocksBinUS != nil && len(stocksBinUS) > 0 { + go initStockDataUS() + } + updateBasicInfo() // Create an instance of the app structure app := NewApp() @@ -133,12 +133,12 @@ func main() { //var width, height int //var err error // - //width, height, err = getScreenResolution() - //if err != nil { - // log.SugaredLogger.Error("get screen resolution error") - // width = 1456 - // height = 768 - //} + width, height, err := getScreenResolution() + if err != nil { + log.SugaredLogger.Error("get screen resolution error") + width = 1456 + height = 768 + } darkTheme := data.NewSettingsApi(&data.Settings{}).GetConfig().DarkTheme backgroundColour := &options.RGBA{R: 255, G: 255, B: 255, A: 1} @@ -147,12 +147,12 @@ func main() { } // Create application with options - err := wails.Run(&options.App{ - Title: "go-stock", - //Width: width * 4 / 5, - //Height: height * 4 / 5, + err = wails.Run(&options.App{ + Title: "go-stock", + Width: width * 4 / 5, + Height: height * 4 / 5, MinWidth: 1456, - MinHeight: 900, + MinHeight: 768, //MaxWidth: width, //MaxHeight: height, DisableResize: false,