Roc 8 ヶ月 前
コミット
51fb8addc6
2 ファイル変更8 行追加0 行削除
  1. 5 0
      models/response/report.go
  2. 3 0
      services/report/report.go

+ 5 - 0
models/response/report.go

@@ -131,6 +131,11 @@ type ReportListItem struct {
 	TitleInfo          string           `json:"title_info"`
 	HasChapter         int              `description:"是否有章节" json:"has_chapter"`
 	VideoUrl           string           `description:"报告音频" json:"video_url"`
+	VideoName          string           `description:"音频文件名称" json:"video_name"`
+	VideoSize          string           `description:"音频文件大小,单位M" json:"video_size"`
+	VideoPlaySeconds   string           `description:"音频播放时长" json:"video_play_seconds"`
+	VideoImg           string           `json:"video_img"` // 音频播放条前面展示的图片
+
 }
 
 type VideoListItem struct {

+ 3 - 0
services/report/report.go

@@ -959,6 +959,8 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 			reportItem.ReportId = reportInfo.Id
 			reportItem.HasChapter = reportInfo.HasChapter
 			reportItem.VideoUrl = reportInfo.VideoUrl
+			reportItem.VideoName = reportInfo.VideoName
+			reportItem.VideoPlaySeconds = reportInfo.VideoPlaySeconds
 			// 样式限制行数
 			reportItem.Title = "<div style=\"-webkit-line-clamp: 2;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;text-overflow: ellipsis;\">" + reportInfo.Title + "</div>"
 			reportItem.PublishTime = reportInfo.PublishTime
@@ -996,6 +998,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 				coverImg = listImgMap[reportInfo.ClassifyIdFirst]
 			}
 			reportItem.ReportImgUrl = coverImg
+			reportItem.VideoImg = reportItem.ReportImgUrl
 
 			if classifyParent.ClassifyName == "晨报" && productAuthOk {
 				// 查询当前晨报的所有音频