zwxi 9 months ago
parent
commit
2297a86e93
2 changed files with 10 additions and 1 deletions
  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:"用户名"`
 	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()
 `
 
-	pyCode = fmt.Sprintf(pyCode, global.CONFIG.ChromePath, reportUrl, filePath)
+	pyCode = fmt.Sprintf(pyCode, global., reportUrl, filePath)
 	global.LOG.Info("jpeg pyCode: \n" + pyCode)
 	cmd := exec.Command("python3", "-c", pyCode)