xingzai преди 2 години
родител
ревизия
e1cfb5e291
променени са 3 файла, в които са добавени 8 реда и са изтрити 5 реда
  1. 4 3
      controllers/activity.go
  2. 0 2
      controllers/activity_special.go
  3. 4 0
      models/resource_data.go

+ 4 - 3
controllers/activity.go

@@ -1633,15 +1633,16 @@ func (this *ActivityController) ActivityListSearch() {
 		item.TripStatus = 2
 		item.ActiveState = v.ActiveState
 		item.PublishDate = v.ActivityTime
-
+		item.FileType = v.FileType
 		if v.VoiceList != nil || v.VideoDetail != nil {
+			item.AudioLink = true
 			if v.FileType == 1 {
 				if v.VoiceList != nil {
-					item.ResourceUrl = v.VoiceList.Url
+					item.VoiceList = v.VoiceList
 				}
 			} else {
 				if v.VideoDetail != nil {
-					item.ResourceUrl = v.VideoDetail.ResourceUrl
+					item.VideoDetail = v.VideoDetail
 				}
 			}
 			au := new(models.UserPermissionAuthInfo)

+ 0 - 2
controllers/activity_special.go

@@ -2,7 +2,6 @@ package controllers
 
 import (
 	"encoding/json"
-	"fmt"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_clpt/models"
 	"hongze/hongze_clpt/services"
@@ -51,7 +50,6 @@ func (this *ActivitySpecialController) SpecialList() {
 
 	conditionActivity := services.ActivityLabelSpecialSql(chartPermissionIds, whichDay, activeState)
 
-	fmt.Println(conditionActivity)
 	list, total, errList := services.GetActivitySpecialList(user, currentIndex, pageSize, "", conditionActivity, activeState)
 	if errList != nil {
 		br.Msg = "获取失败"

+ 4 - 0
models/resource_data.go

@@ -53,6 +53,10 @@ type CygxResourceDataResp struct {
 	ActivityTime            string `description:"活动预期时间"`
 	ResourceUrl             string `description:"链接"`
 	AuthInfo                *UserPermissionAuthInfo
+	VoiceList               *CygxActivityVoiceReq      `description:"音频数据"`
+	VideoDetail             *CygxActivityVideoListResp `description:"视频数据"`
+	AudioLink               bool                       `description:"是否展示回放按钮"`
+	FileType                int                        `description:"类型: 1-音频; 2-视频"`
 }
 
 type HomeResourceDataListResp struct {