|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <nav-bar title="课程详情" v-if="navShow"></nav-bar>
|
|
|
+ <nav-bar title="课程详情" v-show="navShow"></nav-bar>
|
|
|
<view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;" id="top">
|
|
|
<view class="video_box" v-if="!startStatus">
|
|
|
<image :src="$method.splitImgHost(detail.coverUrl)" mode="widthFix" style="width: 100%;height: 460rpx;"></image>
|
|
@@ -272,6 +272,7 @@ export default {
|
|
|
isAllowSeek: 'no',
|
|
|
playbackRate: [1.0],
|
|
|
timer: null,
|
|
|
+ answerTimer:null,
|
|
|
goodsPhotographConfig: null,
|
|
|
intervalTimeList: [], // 间隔拍照时长
|
|
|
intervalTimeIndex: 0, //当前处于哪个时间段拍照
|
|
@@ -314,6 +315,9 @@ export default {
|
|
|
this.courseDetail();
|
|
|
this.getGoodsDetail();
|
|
|
this.getAnswerList();
|
|
|
+ this.answerTimer = setInterval(() => {
|
|
|
+ this.getAnswerList();
|
|
|
+ },5000)
|
|
|
let noteSecond = Number(option.noteSecond);
|
|
|
if(noteSecond>0){
|
|
|
//我的消息跳过来,播放节
|
|
@@ -441,6 +445,7 @@ export default {
|
|
|
console.log('onUnload')
|
|
|
//移除所有的事件监听器
|
|
|
uni.$off();
|
|
|
+ clearInterval(this.answerTimer)
|
|
|
if (this.timer) {
|
|
|
clearInterval(this.timer);
|
|
|
}
|
|
@@ -668,7 +673,6 @@ export default {
|
|
|
courseBusiness(){
|
|
|
this.$api.courseBusiness(this.goodsData.businessId).then(res => {
|
|
|
this.businessData = res.data.data;
|
|
|
- this.businessData.goodsLearningOrder = 2;
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
@@ -1214,19 +1218,27 @@ export default {
|
|
|
}
|
|
|
console.log('提交接口', data);
|
|
|
this.$api.studyRecord(data).then(res => {
|
|
|
- if (status > 0) {
|
|
|
- let moduleId = this.moduleId || 0;
|
|
|
- let chapterId = this.chapterId || 0;
|
|
|
- let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
|
|
|
- let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}`; //拼接对应章节唯一id
|
|
|
- console.log(playNextId,'playNextId')
|
|
|
- console.log(playNextIdisRebuild,'playNextIdisRebuild')
|
|
|
+ if(res.data.code == 200) {
|
|
|
|
|
|
- uni.$emit('playNext'+playNextIdisRebuild,{fromRebuild:this.isRebuild}); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
|
|
|
- uni.$emit('playNext'+playNextId); //通知播放结束
|
|
|
+ if (status > 0) {
|
|
|
+ let moduleId = this.moduleId || 0;
|
|
|
+ let chapterId = this.chapterId || 0;
|
|
|
+ let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
|
|
|
+ let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}`; //拼接对应章节唯一id
|
|
|
+ console.log(playNextId,'playNextId')
|
|
|
+ console.log(playNextIdisRebuild,'playNextIdisRebuild')
|
|
|
+
|
|
|
+ uni.$emit('playNext'+playNextIdisRebuild,{fromRebuild:this.isRebuild}); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
|
|
|
+ uni.$emit('playNext'+playNextId); //通知播放结束
|
|
|
+ }
|
|
|
+
|
|
|
+ self.ossAvatarUrl = ''
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:res.data.msg
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
- self.ossAvatarUrl = ''
|
|
|
console.log(res,'res');
|
|
|
});
|
|
|
},
|
|
@@ -1346,7 +1358,6 @@ export default {
|
|
|
//暂停
|
|
|
polyvPlayerContext.exitFullScreen();
|
|
|
polyvPlayerContext.pause();
|
|
|
- this.photoHistoryList.push(i)
|
|
|
this.photoIndex = i
|
|
|
this.openPhoto();
|
|
|
|
|
@@ -1425,8 +1436,8 @@ export default {
|
|
|
},
|
|
|
async submit() {
|
|
|
const waitYS = await this.imageInfos();
|
|
|
- try{
|
|
|
- await this.postCoursePhotoRecord()
|
|
|
+ this.postCoursePhotoRecord().then(res => {
|
|
|
+ this.photoHistoryList.push(this.photoIndex)
|
|
|
this.postStudyRecord(); //提交记录
|
|
|
//恢复播放
|
|
|
|
|
@@ -1436,13 +1447,14 @@ export default {
|
|
|
if (polyvPlayerContext != null) {
|
|
|
polyvPlayerContext.play();
|
|
|
}
|
|
|
- } catch(err) {
|
|
|
+ }).catch(err => {
|
|
|
uni.showToast({
|
|
|
title: '上传接口报错,请重新拍照上传' + err,
|
|
|
icon: 'none'
|
|
|
});
|
|
|
this.openPhoto();
|
|
|
- }
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
},
|
|
|
reTake() {
|