sun-pc 8 сар өмнө
parent
commit
3c60b26b12
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      src/api/index.go

+ 3 - 3
src/api/index.go

@@ -26,8 +26,8 @@ var Version = "1.0.0"
 var NatsPort int
 
 type Config struct {
-	Version string
-	ExePath string
+	Version string `json:"version"`
+	ExePath string `json:"exePath"`
 }
 
 func RegApi(event *cef.BrowserEvent, window cef.IBrowserWindow, bw *cef.LCLBrowserWindow) {
@@ -383,7 +383,7 @@ func RegApi(event *cef.BrowserEvent, window cef.IBrowserWindow, bw *cef.LCLBrows
 			})
 			if err != nil {
 				// socket.BroadMsgObj(&entity.NormMsg{Sub: eventName, Type: "error", Error: err.Error()})
-				unzipErrorJsFunc := fmt.Sprintf("UnzipErrorJsFunc('%s','%s')", sid, "error")
+				unzipErrorJsFunc := fmt.Sprintf("UnzipErrorJsFunc('%s','%s')", sid, err.Error())
 				fmt.Println("UnzipErrorJsFunc:", unzipErrorJsFunc)
 				window.Chromium().ExecuteJavaScript(unzipErrorJsFunc, "", 0)
 				return