Browse Source

Merge branch 'banner_down' into debug

# Conflicts:
#	config/config.go
zwxi 10 months ago
parent
commit
8c44ecbcb7
2 changed files with 6 additions and 2 deletions
  1. 5 1
      config/config.go
  2. 1 1
      services/share_poster.go

+ 5 - 1
config/config.go

@@ -11,7 +11,7 @@ type Config struct {
 	EsClient    EsClient    `mapstructure:"es_client" json:"es_client" yaml:"es_client"`
 	EsClient    EsClient    `mapstructure:"es_client" json:"es_client" yaml:"es_client"`
 	Mongo       Mongo       `mapstructure:"mongo" json:"mongo" yaml:"mongo"`
 	Mongo       Mongo       `mapstructure:"mongo" json:"mongo" yaml:"mongo"`
 	EtaChartLib EtaChartLib `mapstructure:"eta_chart_lib" json:"eta_chart_lib" yaml:"eta_chart_lib"`
 	EtaChartLib EtaChartLib `mapstructure:"eta_chart_lib" json:"eta_chart_lib" yaml:"eta_chart_lib"`
-	ChromePath string `mapstructure:"chrome-path" json:"chrome-path" yaml:"chrome-path" description:"chrome路径"`
+	System   System   `mapstructure:"system" json:"system" yaml:"system"`
 }
 }
 
 
 // Serve gin服务配置
 // Serve gin服务配置
@@ -107,3 +107,7 @@ type EtaChartLib struct {
 	AppNameEn string `mapstructure:"app_name_en" json:"app_name_en" yaml:"app_name_en" 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:"项目密钥"`
 	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.CONFIG.System.ChromePath, 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)