he2802 3 жил өмнө
parent
commit
ec1de4aca8

+ 1 - 0
pages2/verify/input.vue

@@ -571,6 +571,7 @@ export default {
 				}
 				var datas = {
 					goodsId: this.goodsId,
+					profileTpId: this.goodsId,
 					keyValue: JSON.stringify(objs)
 				};
 				this.$api.addbaseprofiletp(datas).then(res => {

+ 6 - 4
pages3/polyv/detail.vue

@@ -871,9 +871,11 @@ export default {
 		},
 		postStudyRecord(status = 0, sectionId = this.playSectionId) {
 			let currentTime = 0;
+			let PlayDuration = 0
 			var polyvPlayerContext = this.selectComponent('#playerVideo');
 			if (polyvPlayerContext) {
-				currentTime = polyvPlayerContext.getCurrentTime(); //录播回放
+				currentTime = polyvPlayerContext.getCurrentTime(); //总的视频播放时刻
+				PlayDuration = polyvPlayerContext.getVideoPlayDuration();//本次看的时长
 			}
 			if(this.playChannelId>0){
 				currentTime = 2;//直播无法获取,无论开始结束都传2秒
@@ -884,12 +886,12 @@ export default {
 				sectionId: parseInt(sectionId),
 				goodsId: parseInt(self.goodsId),
 				courseId: parseInt(self.courseId),
-				studyDuration: parseInt(currentTime > 0 ? currentTime : self.studyDuration),
+				studyDuration: parseInt(PlayDuration > 0 ? PlayDuration : self.studyDuration),
 				gradeId: parseInt(self.gradeId),
 				chapterId: parseInt(self.chapterId),
-				moduleId: parseInt(self.moduleId)
+				moduleId: parseInt(self.moduleId),
+				videoCurrentTime: parseInt(currentTime > 0 ? currentTime : self.studyDuration)
 			};
-			
 			if (status > 0) {
 				data.status = status;
 			}