zwxi 10 月之前
父節點
當前提交
3f85817990
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 1
      config/config.go
  2. 1 1
      services/share_poster.go

+ 2 - 1
config/config.go

@@ -10,7 +10,7 @@ type Config struct {
 	AliOss   AliOss   `mapstructure:"ali-oss" json:"ali-oss" yaml:"ali-oss"`
 	EsClient EsClient `mapstructure:"es_client" json:"es_client" yaml:"es_client"`
 	Mongo    Mongo    `mapstructure:"mongo" json:"mongo" yaml:"mongo"`
-	ChromePath string `mapstructure:"chrome-path" json:"chrome-path" yaml:"chrome-path" description:"chrome路径"`
+	System   System   `mapstructure:"system" json:"system" yaml:"system"`
 }
 
 // Serve gin服务配置
@@ -109,3 +109,4 @@ type EtaChartLib struct {
 
 type System struct {
 	ChromePath string `mapstructure:"chrome-path" json:"chrome-path" yaml:"chrome-path" description:"chrome路径"`
+}

+ 1 - 1
services/share_poster.go

@@ -480,7 +480,7 @@ finally:
     loop.close()
 `
 
-	pyCode = fmt.Sprintf(pyCode, global., reportUrl, filePath)
+	pyCode = fmt.Sprintf(pyCode, global.CONFIG.System.ChromePath, reportUrl, filePath)
 	global.LOG.Info("jpeg pyCode: \n" + pyCode)
 	cmd := exec.Command("python3", "-c", pyCode)