Browse Source

Merge branch 'v1'

# Conflicts:
#	routers/commentsRouter.go
Roc 1 year ago
parent
commit
f67ba3ecca
2 changed files with 7 additions and 4 deletions
  1. 1 4
      services/ppt.go
  2. 6 0
      utils/config.go

+ 1 - 4
services/ppt.go

@@ -143,10 +143,7 @@ func pptContent2Html(content string, isEnglish bool) (htm string, err error) {
 	pageLen := len(contents)
 	htmlContent := ``
 	// iframe图表/表格域名
-	chartRoot := `https://chartlib.hzinsights.com`
-	if utils.RunMode == "debug" {
-		chartRoot = `https://charttest.hzinsights.com`
-	}
+	chartRoot := utils.PublicChartHost
 	if pageLen > 0 {
 		htmlPrefix := `<p style="text-align: left; margin-top: 10px; font-size: 16px;">`
 		htmlSuffix := `</p>`

+ 6 - 0
utils/config.go

@@ -48,6 +48,9 @@ var (
 	APP_EDB_LIB_NAME_EN string
 	EDB_LIB_Md5_KEY     string
 
+	// PublicChartHost 公共图库的host
+	PublicChartHost string
+
 	// MySteelPostUrl 钢联化工的服务地址
 	MySteelPostUrl string
 
@@ -250,6 +253,9 @@ func init() {
 		APP_EDB_LIB_NAME_EN = config["app_edb_lib_name_en"]
 		EDB_LIB_Md5_KEY = config["edb_lib_md5_key"]
 
+		// 图表项目域名
+		PublicChartHost = config["public_chart_host"]
+
 		// 钢联化工服务地址
 		MySteelPostUrl = config["mysteel_post_url"]