Browse Source

Merge branch 'feature/eta1.0.6_wx_share' into debug

xyxie 1 year ago
parent
commit
777bcc6b63
2 changed files with 34 additions and 0 deletions
  1. 16 0
      controllers/english_report.go
  2. 18 0
      controllers/report_share.go

+ 16 - 0
controllers/english_report.go

@@ -470,6 +470,22 @@ func (this *EnglishReportShareController) TrialEnglishReportDetail() {
 	}
 
 	resp := new(models.EnglishReportShareDetailResp)
+	// 免责声明
+	conf, e := models.GetBusinessConf()
+	if e != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取免责声明失败, Err: " + e.Error()
+		return
+	}
+
+	// 研报分享抬头
+	if v, ok := conf[models.BusinessConfH5ShareEnName]; ok {
+		resp.H5ShareEnName = v
+	}
+	if v, ok := conf[models.BusinessConfH5ReportShareImg]; ok {
+		resp.H5ReportShareImg = v
+	}
+	resp.Hz = 1
 	resp.Report = report
 	br.Ret = 200
 	br.Success = true

+ 18 - 0
controllers/report_share.go

@@ -95,6 +95,24 @@ func (this *ReportShareController) TrialDetail() {
 
 	resp := new(models.ReportShareDetailResp)
 	resp.Report = report
+	// 免责声明
+	conf, e := models.GetBusinessConf()
+	if e != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取免责声明失败, Err: " + e.Error()
+		return
+	}
+	if conf[models.BusinessConfDisclaimer] != "" {
+		resp.Disclaimer = conf[models.BusinessConfDisclaimer]
+	}
+	// 研报分享抬头
+	if v, ok := conf[models.BusinessConfH5ShareName]; ok {
+		resp.H5ShareName = v
+	}
+	if v, ok := conf[models.BusinessConfH5ReportShareImg]; ok {
+		resp.H5ReportShareImg = v
+	}
+
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"