Jelajahi Sumber

fix:报告详情新增返回logo和免责声明

Roc 3 bulan lalu
induk
melakukan
ebc6b2f275
4 mengubah file dengan 9 tambahan dan 9 penghapusan
  1. 8 0
      controllers/report_share.go
  2. 0 8
      controllers/smart_report.go
  3. 1 0
      models/report.go
  4. 0 1
      models/smart_report.go

+ 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)

+ 0 - 8
controllers/smart_report.go

@@ -89,14 +89,6 @@ func (this *SmartReportController) Detail() {
 	if v, ok := conf[models.BusinessConfH5ReportShareImg]; ok {
 		resp.H5ReportShareImg = v
 	}
-	// 报告Logo
-	if v, ok := conf[models.BusinessConfReportCenterLogoShow]; ok {
-		if v == `true` {
-			if reportLogo, ok := conf[models.BusinessConfReportLogo]; ok {
-				resp.ReportLogo = reportLogo
-			}
-		}
-	}
 
 	// 更新pv
 	if e = models.UpdateSmartReportPv(item.SmartReportId); e != nil {

+ 1 - 0
models/report.go

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

+ 0 - 1
models/smart_report.go

@@ -192,7 +192,6 @@ type SmartReportShareDetailResp struct {
 	H5ShareName      string           `description:"研报分享抬头"`
 	H5ReportShareImg string           `description:"研报分享图片"`
 	Hz               int
-	ReportLogo       string `description:"报告logo"`
 }
 
 // UpdateSmartReportPv 研报pv自增