|
|
@@ -283,7 +283,11 @@
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
<!-- 摄像头 -->
|
|
|
- <Popup-camera @submitPhoto="submitPhoto" ref="camera" />
|
|
|
+ <Popup-camera
|
|
|
+ @submitPhoto="submitPhoto"
|
|
|
+ :visible.sync="showCamera"
|
|
|
+ ref="camera"
|
|
|
+ />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -353,7 +357,6 @@ export default {
|
|
|
newActiveSubjectId: "", //当前选中ID
|
|
|
compareFaceData: 0, // 拍照匹配相似度
|
|
|
prendreAutoCarme: false, // 是否发起授权相机
|
|
|
- studyTimer: null, // 学习记录定时器
|
|
|
CountTo: 0, // 倒计时
|
|
|
CountTo1: 0,
|
|
|
menuAllList: [],
|
|
|
@@ -739,8 +742,6 @@ export default {
|
|
|
this.refPlv.playPause();
|
|
|
}
|
|
|
this.postStudyRecord(0);
|
|
|
- //清除直播
|
|
|
- this.studyTimer && clearInterval(this.studyTimer);
|
|
|
this.photoConfig = false;
|
|
|
this.photoList = [];
|
|
|
this.moduleId = item.moduleId || null;
|
|
|
@@ -767,16 +768,8 @@ export default {
|
|
|
this.postStudyRecord();
|
|
|
}
|
|
|
this.refPlv = null;
|
|
|
- //清除正在播放的节ID
|
|
|
- // this.$store.commit('setPlayObj',null)
|
|
|
- this.$store.commit("setPlaySectionId", { playSectionId: 0 });
|
|
|
-
|
|
|
//移除所有的事件监听器
|
|
|
uni.$off();
|
|
|
-
|
|
|
- if (this.studyTimer) {
|
|
|
- clearInterval(this.studyTimer);
|
|
|
- }
|
|
|
this.clearPauseTimer();
|
|
|
if (this.lockTimer) {
|
|
|
clearInterval(this.lockTimer);
|
|
|
@@ -936,7 +929,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
|
- async submitPhoto(url, compareFaceData, cb) {
|
|
|
+ async submitPhoto(url, compareFaceData) {
|
|
|
this.ossAvatarUrl = url;
|
|
|
this.compareFaceData = compareFaceData;
|
|
|
this.postCoursePhotoRecord()
|
|
|
@@ -945,11 +938,11 @@ export default {
|
|
|
await this.postStudyRecord();
|
|
|
if (this.erJianErZao && this.isReach) {
|
|
|
await this.postStudyRecord(1);
|
|
|
- cb();
|
|
|
+ this.closeCamera();
|
|
|
this.nextSection();
|
|
|
return;
|
|
|
}
|
|
|
- cb();
|
|
|
+ this.closeCamera();
|
|
|
this.refPlv.resumeVideo();
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -957,7 +950,7 @@ export default {
|
|
|
title: "上传接口报错,请重新拍照上传" + err,
|
|
|
icon: "none",
|
|
|
});
|
|
|
- cb(1);
|
|
|
+ this.$refs["camera"].reTake();
|
|
|
});
|
|
|
},
|
|
|
toQuestionBank(sectionItem) {
|
|
|
@@ -1314,9 +1307,6 @@ export default {
|
|
|
if ((this.photoNum > 0 || this.jjShiGongYuan) && learning != 1) {
|
|
|
await this.getPhotoLastRecord();
|
|
|
}
|
|
|
- this.$store.commit("setPlaySectionId", {
|
|
|
- playSectionId: sectionId,
|
|
|
- });
|
|
|
if (this.refPlv) {
|
|
|
this.refPlv.changeVid({
|
|
|
vid: recordingUrl,
|
|
|
@@ -1498,6 +1488,7 @@ export default {
|
|
|
}).then((res) => {});
|
|
|
},
|
|
|
timeupdate(time) {
|
|
|
+ console.log("🚀 ~ file: detail.vue:1498 ~ timeupdate ~ time:");
|
|
|
if (this.noticeShow) {
|
|
|
this.refPlv.playPause();
|
|
|
return;
|
|
|
@@ -1509,31 +1500,21 @@ export default {
|
|
|
playing() {
|
|
|
console.log("palying");
|
|
|
this.isPlaying = true;
|
|
|
- if (!this.videoCurrentTime) {
|
|
|
- this.postStudyRecord(0);
|
|
|
- }
|
|
|
this.clearPauseTimer();
|
|
|
- // this.studyTimer && clearInterval(this.studyTimer);
|
|
|
- // this.studyTimer = setInterval(() => {
|
|
|
- // this.postStudyRecord(0);
|
|
|
- // }, 15000);
|
|
|
},
|
|
|
openCamera() {
|
|
|
console.log("拍照");
|
|
|
this.showCamera = true;
|
|
|
- this.$refs["camera"].openCamera();
|
|
|
this.refPlv.playPause();
|
|
|
this.refPlv.exitFullScreen();
|
|
|
},
|
|
|
closeCamera() {
|
|
|
this.showCamera = false;
|
|
|
- this.$refs["camera"].closeCamera();
|
|
|
},
|
|
|
pause() {
|
|
|
console.log("暂停");
|
|
|
this.isPlaying = false;
|
|
|
this.erJianErZaoPauseTip();
|
|
|
- clearInterval(this.studyTimer);
|
|
|
},
|
|
|
async ended() {
|
|
|
console.log("结束");
|
|
|
@@ -1543,7 +1524,6 @@ export default {
|
|
|
title: "播放完毕",
|
|
|
});
|
|
|
this.clearPauseTimer();
|
|
|
- clearInterval(this.studyTimer);
|
|
|
await this.postStudyRecord(1);
|
|
|
this.nextSection();
|
|
|
},
|
|
|
@@ -1613,9 +1593,6 @@ export default {
|
|
|
this.sectionId = data.sectionId;
|
|
|
if (data.sectionType == 1) {
|
|
|
//录播
|
|
|
- this.$store.commit("setPlaySectionId", {
|
|
|
- playSectionId: data.sectionId,
|
|
|
- });
|
|
|
this.photoConfig = false;
|
|
|
this.sectionItem = data;
|
|
|
this.playVideo(data);
|
|
|
@@ -1624,9 +1601,6 @@ export default {
|
|
|
this.studyRecordGetLastLive();
|
|
|
} else if (data.sectionType == 3) {
|
|
|
//回放
|
|
|
- this.$store.commit("setPlaySectionId", {
|
|
|
- playSectionId: data.sectionId,
|
|
|
- });
|
|
|
this.sectionItem = data;
|
|
|
this.playVideo(data);
|
|
|
}
|