Quellcode durchsuchen

Merge branch 'master' of eta_server/eta_report into custom

xyxie vor 3 Monaten
Ursprung
Commit
115b623c2d
5 geänderte Dateien mit 37 neuen und 10 gelöschten Zeilen
  1. 12 0
      controllers/english_report.go
  2. 8 0
      controllers/report_share.go
  3. 14 10
      models/business_conf.go
  4. 2 0
      models/english_report.go
  5. 1 0
      models/report.go

+ 12 - 0
controllers/english_report.go

@@ -120,6 +120,18 @@ func (this *EnglishReportShareController) EnglishReportDetail() {
 	if v, ok := conf[models.BusinessConfWatermarkReport]; ok {
 		resp.WatermarkReport = v
 	}
+	if conf[models.BusinessConfDisclaimerEn] != "" {
+		resp.DisclaimerEn = conf[models.BusinessConfDisclaimerEn]
+	}
+	// 报告Logo
+	if v, ok := conf[models.BusinessConfReportEnLogoShow]; ok {
+		if v == `true` {
+			if reportLogo, ok := conf[models.BusinessConfReportLogo]; ok {
+				resp.ReportLogo = reportLogo
+			}
+		}
+	}
+
 	resp.Hz = 1
 	resp.Report = report
 	br.Ret = 200

+ 8 - 0
controllers/report_share.go

@@ -85,6 +85,14 @@ func (this *ReportShareController) Detail() {
 	if v, ok := conf[models.BusinessConfWatermarkReport]; ok {
 		resp.WatermarkReport = v
 	}
+	// 报告Logo
+	if v, ok := conf[models.BusinessConfReportCenterLogoShow]; ok {
+		if v == `true` {
+			if reportLogo, ok := conf[models.BusinessConfReportLogo]; ok {
+				resp.ReportLogo = reportLogo
+			}
+		}
+	}
 
 	// 章节类型的报告
 	resp.Report = new(models.ReportItem)

+ 14 - 10
models/business_conf.go

@@ -7,16 +7,20 @@ import (
 )
 
 const (
-	BusinessConfDisclaimer       = "Disclaimer"
-	BusinessConfH5ShareName      = "H5ShareName"
-	BusinessConfH5ShareEnName    = "H5ShareEnName"
-	BusinessConfH5ReportShareImg = "H5ReportShareImg"
-	BusinessConfWatermarkChart   = "WatermarkChart"
-	BusinessConfWatermarkReport  = "WatermarkReport"
-	BusinessConfWxAppId          = "WxAppId"
-	BusinessConfWxAppSecret      = "WxAppSecret"
-	BusinessConfReportViewUrl    = "ReportViewUrl"
-	BusinessConfReport2ImgUrl    = "Report2ImgUrl"
+	BusinessConfDisclaimer           = "Disclaimer"
+	BusinessConfH5ShareName          = "H5ShareName"
+	BusinessConfH5ShareEnName        = "H5ShareEnName"
+	BusinessConfH5ReportShareImg     = "H5ReportShareImg"
+	BusinessConfWatermarkChart       = "WatermarkChart"
+	BusinessConfWatermarkReport      = "WatermarkReport"
+	BusinessConfWxAppId              = "WxAppId"
+	BusinessConfWxAppSecret          = "WxAppSecret"
+	BusinessConfReportViewUrl        = "ReportViewUrl"
+	BusinessConfReport2ImgUrl        = "Report2ImgUrl"
+	BusinessConfReportLogo           = "ReportLogo"           // 报告logo
+	BusinessConfReportCenterLogoShow = "ReportCenterLogoShow" // 报告logo
+	BusinessConfReportEnLogoShow     = "ReportEnLogoShow"     // 报告logo
+	BusinessConfDisclaimerEn         = "DisclaimerEn"         // 英文免责声明
 )
 
 // BusinessConf 商户配置表

+ 2 - 0
models/english_report.go

@@ -44,6 +44,8 @@ type EnglishReportShareDetailResp struct {
 	WatermarkChart   string               `description:"图表是否需要水印"`
 	WatermarkReport  string               `description:"报告是否需要水印"`
 	Hz               int
+	DisclaimerEn     string `description:"免责声明"`
+	ReportLogo       string `description:"报告logo"`
 }
 
 func UpdateEnglishReportCounts(reportCode string) (err error) {

+ 1 - 0
models/report.go

@@ -72,6 +72,7 @@ type ReportShareDetailResp struct {
 	WatermarkChart   string      `description:"图表是否需要水印"`
 	WatermarkReport  string      `description:"报告是否需要水印"`
 	Hz               int
+	ReportLogo       string `description:"报告logo"`
 }
 
 type ReportItem struct {