Browse Source

fix videoUrl

ziwen 2 years ago
parent
commit
7fbfc23e70
2 changed files with 17 additions and 15 deletions
  1. 15 15
      controllers/report.go
  2. 2 0
      models/report.go

+ 15 - 15
controllers/report.go

@@ -611,21 +611,21 @@ func (this *ReportController) List() {
 		//	list[i].Abstract, _ = services.GetReportContentTextSub(item.Abstract)
 		//}
 
-		//for k, v := range list {
-		//	if v.Readnum == 0 && user.CreatedTime.Before(utils.StrTimeToTime(v.PublishDate)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(v.PublishDate)) {
-		//		list[k].IsRed = true
-		//	}
-		//	if v.VideoUrl != "" {
-		//		list[k].IsHaveVideo = true
-		//	}
-		//	list[k].ImgUrlPc = mapCategoryUrl[v.CategoryId]
-		//
-		//	if mapCategoryUrl[v.CategoryId] == "" {
-		//		if detail.ChartPermissionId == utils.YI_YAO_ID {
-		//			list[k].ImgUrlPc = utils.YI_YAO_QI_TA
-		//		}
-		//	}
-		//}
+		for k, v := range list {
+			//if v.Readnum == 0 && user.CreatedTime.Before(utils.StrTimeToTime(v.PublishDate)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(v.PublishDate)) {
+			//	list[k].IsRed = true
+			//}
+			if v.VideoUrl != "" {
+				list[k].IsHaveVideo = true
+			}
+			//list[k].ImgUrlPc = mapCategoryUrl[v.CategoryId]
+			//
+			//if mapCategoryUrl[v.CategoryId] == "" {
+			//	if detail.ChartPermissionId == utils.YI_YAO_ID {
+			//		list[k].ImgUrlPc = utils.YI_YAO_QI_TA
+			//	}
+			//}
+		}
 
 		//resp.CategoryImgUrlPc = mapChartPermission[detail.ChartPermissionName]
 

+ 2 - 0
models/report.go

@@ -837,6 +837,8 @@ type TimeLineReportItem struct {
 	Title       string `description:"标题"`
 	PublishTime string `description:"发布时间"`
 	Content     string `description:"内容"`
+	VideoUrl    string `description:"视频链接"`
+	IsHaveVideo bool   `description:"是否包含视频"`
 }
 
 //获取产业报告+晨会点评列表