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

+ 9 - 0
config/config.go

@@ -100,3 +100,12 @@ type Mongo struct {
 	Username      string `mapstructure:"username" json:"username" yaml:"username" description:"用户名"`
 	Username      string `mapstructure:"username" json:"username" yaml:"username" description:"用户名"`
 	Password      string `mapstructure:"password" json:"password" yaml:"password" description:"密码"`
 	Password      string `mapstructure:"password" json:"password" yaml:"password" description:"密码"`
 }
 }
+
+type EtaChartLib struct {
+	ServerUrl string `mapstructure:"server_url" json:"server_url" yaml:"server_url" description:"项目请求地址"`
+	AppNameEn string `mapstructure:"app_name_en" json:"app_name_en" yaml:"app_name_en" description:"项目名称"`
+	Md5Key    string `mapstructure:"md5_key" json:"md5_key" yaml:"md5_key" description:"项目密钥"`
+}
+
+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()
     loop.close()
 `
 `
 
 
-	pyCode = fmt.Sprintf(pyCode, global.CONFIG.ChromePath, reportUrl, filePath)
+	pyCode = fmt.Sprintf(pyCode, global., reportUrl, filePath)
 	global.LOG.Info("jpeg pyCode: \n" + pyCode)
 	global.LOG.Info("jpeg pyCode: \n" + pyCode)
 	cmd := exec.Command("python3", "-c", pyCode)
 	cmd := exec.Command("python3", "-c", pyCode)