xingzai пре 1 година
родитељ
комит
755e9574a1
1 измењених фајлова са 16 додато и 1 уклоњено
  1. 16 1
      controllers/user.go

+ 16 - 1
controllers/user.go

@@ -305,7 +305,6 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = detail.Title
-		title = detail.Title
 		if detail.ArticleTypeId > 0 {
 			isResearch = true
 		}
@@ -331,6 +330,17 @@ func (this *UserController) ApplyTryOut() {
 		title = microAudio.VoiceName
 		sourceId = microAudio.ActivityId
 		source = "activityvoice"
+	} else if tryType == "ActivityVideo" {
+		// 活动视频
+		activityVideo, e := models.GetCygxActivityVideoById(detailId)
+		if e != nil {
+			br.Msg = "操作失败"
+			br.ErrMsg = "微路演音频信息有误, 不存在的VoiceId: " + strconv.Itoa(detailId)
+			return
+		}
+		title = activityVideo.VideoName
+		sourceId = activityVideo.ActivityId
+		source = "activityvideo"
 	} else if tryType == "MicroVideo" {
 		// 微路演视频
 		microVideo, e := models.GetMicroRoadshowVideoById(detailId)
@@ -340,6 +350,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = microVideo.VideoName
+		source = "roadshow"
 	} else if tryType == "Researchsummary" {
 		// 本周研究汇总
 		ResearchSummaryInfo, e := models.GetCygxResearchSummaryInfoById(detailId)
@@ -349,6 +360,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = ResearchSummaryInfo.Title
+		source = "researchsummary"
 	} else if tryType == "Minutessummary" {
 		// 上周纪要汇总
 		MinutesSummaryInfo, e := models.GetCygxMinutesSummaryInfoById(detailId)
@@ -358,6 +370,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = MinutesSummaryInfo.Title
+		source = "minutessummary"
 	} else if tryType == "ReportSelection" {
 		// 报告精选
 		ReportSelectionInfo, e := models.GetCygxReportSelectionInfoById(detailId)
@@ -367,6 +380,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = ReportSelectionInfo.Title
+		source = "reportselection"
 	} else if tryType == "ProductInterior" {
 		// 产品内测
 		ProductInteriorDetail, e := models.GetCygxProductInteriorDetail(detailId)
@@ -376,6 +390,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = ProductInteriorDetail.Title
+		source = "productinterior"
 	}
 
 	//缓存校验