|
@@ -659,6 +659,8 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
itemVoice.VoiceName = vo.Name
|
|
|
itemVoice.VoiceUrl = vo.Url
|
|
|
itemVoice.VoicePlaySeconds = vo.PlaySeconds
|
|
|
+ itemVoice.BackgroundImg = req.BackgroundImg
|
|
|
+ itemVoice.ShareImg = req.ShareImg
|
|
|
itemVoice.CreateTime = time.Now()
|
|
|
}
|
|
|
}
|
|
@@ -669,6 +671,8 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
itemVideo.ActivityId = activityId
|
|
|
itemVideo.VideoDuration = videoDetail.VideoDuration
|
|
|
itemVideo.VideoUrl = videoDetail.VideoUrl
|
|
|
+ itemVideo.BackgroundImg = req.BackgroundImg
|
|
|
+ itemVideo.ShareImg = req.ShareImg
|
|
|
itemVideo.ModifyDate = time.Now().Format(utils.FormatDateTime)
|
|
|
itemVideo.CreateTime = time.Now().Format(utils.FormatDateTime)
|
|
|
}
|
|
@@ -1131,6 +1135,11 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
}
|
|
|
if len(VoiceReqList) == 0 {
|
|
|
VoiceReqList = make([]*cygx.CygxActivityVoiceReq, 0)
|
|
|
+ } else {
|
|
|
+ for _, v := range VoiceReqList {
|
|
|
+ activityInfo.BackgroundImg = v.BackgroundImg
|
|
|
+ activityInfo.ShareImg = v.ShareImg
|
|
|
+ }
|
|
|
}
|
|
|
VideoDetail, err := cygx.GetCygxActivityVideoReqDetail(activityId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
@@ -1138,6 +1147,10 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
br.ErrMsg = "GetCygxActivityVideoReqDetail,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
|
|
|
return
|
|
|
}
|
|
|
+ if VideoDetail != nil {
|
|
|
+ activityInfo.BackgroundImg = VideoDetail.BackgroundImg
|
|
|
+ activityInfo.ShareImg = VideoDetail.ShareImg
|
|
|
+ }
|
|
|
if activityInfo.CustomerTypeIds != "" {
|
|
|
customerTypeIdslist := strings.Split(activityInfo.CustomerTypeIds, ",")
|
|
|
var permissionValueStr string
|
|
@@ -1180,6 +1193,20 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
if activityInfo.VisibleRange == 0 {
|
|
|
activityInfo.VisibleRange = 2
|
|
|
}
|
|
|
+
|
|
|
+ ////如果是已结束的活动,而且封面图片为空,那么就给一个默认的图片
|
|
|
+ //if activityInfo.ActiveState == 3 && activityInfo.BackgroundImg == "" {
|
|
|
+ // // 获取默认图配置 目前音频视频用的是同一个封面图,暂时不做区分处理
|
|
|
+ // audioMap, _, audioShareMap, _, err := cygxService.GetMicroRoadShowDefaultImgConfig()
|
|
|
+ // if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ // br.Msg = "获取信息失败"
|
|
|
+ // br.ErrMsg = "GetMicroRoadShowDefaultImgConfig,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // activityInfo.BackgroundImg = audioMap[activityInfo.ChartPermissionId]
|
|
|
+ // activityInfo.ShareImg = audioShareMap[activityInfo.ChartPermissionId]
|
|
|
+ //}
|
|
|
+
|
|
|
//activityInfo.CancelDeadlineType = cygxService.ActivityCancelDeadlineType(activityInfo) //处理活动取消报名截止时间类型展示
|
|
|
activityInfo.VoiceList = VoiceReqList
|
|
|
activityInfo.VideoDetail = VideoDetail
|