|
@@ -22,7 +22,7 @@
|
|
|
:autoplay="autoplay"
|
|
:autoplay="autoplay"
|
|
|
:allowSeek="isAllowSeek"
|
|
:allowSeek="isAllowSeek"
|
|
|
:playbackRate="playbackRate"
|
|
:playbackRate="playbackRate"
|
|
|
- :videoCurrentTime="recordObj.videoCurrentTime || 0"
|
|
|
|
|
|
|
+ :videoCurrentTime="videoCurrentTime || 0"
|
|
|
@playing="playing"
|
|
@playing="playing"
|
|
|
@pause="pause"
|
|
@pause="pause"
|
|
|
@ended="ended"
|
|
@ended="ended"
|
|
@@ -332,7 +332,7 @@ export default {
|
|
|
gradeId: 0,
|
|
gradeId: 0,
|
|
|
chapterId: 0,
|
|
chapterId: 0,
|
|
|
moduleId: 0,
|
|
moduleId: 0,
|
|
|
- recordObj: {},
|
|
|
|
|
|
|
+ videoCurrentTime: 0,
|
|
|
photoIndex: 0,
|
|
photoIndex: 0,
|
|
|
isTaking: true, //是否正在拍照
|
|
isTaking: true, //是否正在拍照
|
|
|
needSeek: false, //第一次播放是否需要跳转
|
|
needSeek: false, //第一次播放是否需要跳转
|
|
@@ -430,6 +430,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
async onLoad(option) {
|
|
async onLoad(option) {
|
|
|
|
|
+ console.log("🚀 ~ file: detail.vue:433 ~ onLoad ~ option:", option);
|
|
|
if (option.isOther) {
|
|
if (option.isOther) {
|
|
|
this.showMark = true;
|
|
this.showMark = true;
|
|
|
return;
|
|
return;
|
|
@@ -451,6 +452,7 @@ export default {
|
|
|
this.init();
|
|
this.init();
|
|
|
},
|
|
},
|
|
|
async onShow() {
|
|
async onShow() {
|
|
|
|
|
+ console.log("🚀 ~ file: detail.vue:455 ~ onShow ~ onShow:", this.isCache);
|
|
|
if (this.isCache) {
|
|
if (this.isCache) {
|
|
|
this.isCache = false;
|
|
this.isCache = false;
|
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
@@ -461,7 +463,6 @@ export default {
|
|
|
// #endif
|
|
// #endif
|
|
|
}
|
|
}
|
|
|
if (this.beforeHideIsPlaying) {
|
|
if (this.beforeHideIsPlaying) {
|
|
|
- console.log("🚀 ~ file: detail.vue:464 ~ onShow ~ beforeHideIsPlaying:", this.beforeHideIsPlaying)
|
|
|
|
|
// 二建二造提示弹出来
|
|
// 二建二造提示弹出来
|
|
|
if (this.playSecIsLearn && this.erJianErZao && this.pauseTimer == null) {
|
|
if (this.playSecIsLearn && this.erJianErZao && this.pauseTimer == null) {
|
|
|
return;
|
|
return;
|
|
@@ -497,6 +498,15 @@ export default {
|
|
|
this.isCanLearn()
|
|
this.isCanLearn()
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
this.courseCourseList();
|
|
this.courseCourseList();
|
|
|
|
|
+ uni.addInterceptor("navigateTo", {
|
|
|
|
|
+ invoke({ url }) {
|
|
|
|
|
+ console.log(
|
|
|
|
|
+ "🚀 ~ file: detail.vue:503 ~ invoke ~ url:",
|
|
|
|
|
+ url.includes("/pages2/class/questionBank")
|
|
|
|
|
+ );
|
|
|
|
|
+ this.isCache = url.includes("/pages2/class/questionBank");
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -679,12 +689,12 @@ export default {
|
|
|
console.log("开启定时器");
|
|
console.log("开启定时器");
|
|
|
this.pauseTimer = setInterval(() => {
|
|
this.pauseTimer = setInterval(() => {
|
|
|
console.log("暂停时间", Date.now() - this.pauseTime, this.pauseTime);
|
|
console.log("暂停时间", Date.now() - this.pauseTime, this.pauseTime);
|
|
|
- if (Date.now() - this.pauseTime > 5 * 60 * 1000) {
|
|
|
|
|
|
|
+ if (Date.now() - this.pauseTime > 20 * 1000) {
|
|
|
// 5 * 60 * 1000
|
|
// 5 * 60 * 1000
|
|
|
let text = "暂停";
|
|
let text = "暂停";
|
|
|
if (this.showCamera) {
|
|
if (this.showCamera) {
|
|
|
text = "拍照停留";
|
|
text = "拍照停留";
|
|
|
- this.refPlv.closeCamera();
|
|
|
|
|
|
|
+ this.closeCamera();
|
|
|
}
|
|
}
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: "提示",
|
|
title: "提示",
|
|
@@ -1123,6 +1133,7 @@ export default {
|
|
|
return Promise.resolve();
|
|
return Promise.resolve();
|
|
|
},
|
|
},
|
|
|
async isCanLearn() {
|
|
async isCanLearn() {
|
|
|
|
|
+ return Promise.resolve();
|
|
|
this.option.isQ !== "" && (await this.qCheckIsCanLearn());
|
|
this.option.isQ !== "" && (await this.qCheckIsCanLearn());
|
|
|
await this.getbaseprofiletplists();
|
|
await this.getbaseprofiletplists();
|
|
|
await this.getGradeInfo();
|
|
await this.getGradeInfo();
|
|
@@ -1290,9 +1301,12 @@ export default {
|
|
|
async playVideo(item) {
|
|
async playVideo(item) {
|
|
|
this.sectionItem = item;
|
|
this.sectionItem = item;
|
|
|
let { learning, videoCurrentTime, sectionId, recordingUrl } = item;
|
|
let { learning, videoCurrentTime, sectionId, recordingUrl } = item;
|
|
|
- this.recordObj = videoCurrentTime
|
|
|
|
|
- ? { videoCurrentTime }
|
|
|
|
|
- : await this.getRecordLast(item);
|
|
|
|
|
|
|
+ this.videoCurrentTime =
|
|
|
|
|
+ videoCurrentTime || (await this.getRecordLast(item));
|
|
|
|
|
+ // 往前播3秒
|
|
|
|
|
+ if (this.videoCurrentTime > 3) {
|
|
|
|
|
+ this.videoCurrentTime -= 3;
|
|
|
|
|
+ }
|
|
|
// 查找拍照历史
|
|
// 查找拍照历史
|
|
|
if ((this.photoNum > 0 || this.jjShiGongYuan) && learning != 1) {
|
|
if ((this.photoNum > 0 || this.jjShiGongYuan) && learning != 1) {
|
|
|
await this.getPhotoLastRecord();
|
|
await this.getPhotoLastRecord();
|
|
@@ -1303,7 +1317,7 @@ export default {
|
|
|
if (this.refPlv) {
|
|
if (this.refPlv) {
|
|
|
this.refPlv.changeVid({
|
|
this.refPlv.changeVid({
|
|
|
vid: recordingUrl,
|
|
vid: recordingUrl,
|
|
|
- videoCurrentTime: this.recordObj.videoCurrentTime,
|
|
|
|
|
|
|
+ videoCurrentTime: this.videoCurrentTime,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1319,10 +1333,7 @@ export default {
|
|
|
moduleId: moduleId || 0,
|
|
moduleId: moduleId || 0,
|
|
|
};
|
|
};
|
|
|
this.$api.recordLast(data).then((res) => {
|
|
this.$api.recordLast(data).then((res) => {
|
|
|
- if (res.data.data.videoCurrentTime > 3) {
|
|
|
|
|
- res.data.data.videoCurrentTime -= 3;
|
|
|
|
|
- }
|
|
|
|
|
- resolve(res.data.data);
|
|
|
|
|
|
|
+ resolve(res.data.data.videoCurrentTime);
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -1485,7 +1496,6 @@ export default {
|
|
|
}).then((res) => {});
|
|
}).then((res) => {});
|
|
|
},
|
|
},
|
|
|
timeupdate(time) {
|
|
timeupdate(time) {
|
|
|
- // console.log("播放中", time);
|
|
|
|
|
if (this.noticeShow) {
|
|
if (this.noticeShow) {
|
|
|
this.refPlv.playPause();
|
|
this.refPlv.playPause();
|
|
|
return;
|
|
return;
|
|
@@ -1495,10 +1505,10 @@ export default {
|
|
|
this.timeEvent(time);
|
|
this.timeEvent(time);
|
|
|
},
|
|
},
|
|
|
playing() {
|
|
playing() {
|
|
|
- console.log("playing");
|
|
|
|
|
|
|
+ console.log("palying");
|
|
|
this.isPlaying = true;
|
|
this.isPlaying = true;
|
|
|
this.studyLog();
|
|
this.studyLog();
|
|
|
- if (!this.recordObj.videoCurrentTime) {
|
|
|
|
|
|
|
+ if (!this.videoCurrentTime) {
|
|
|
this.postStudyRecord(0);
|
|
this.postStudyRecord(0);
|
|
|
}
|
|
}
|
|
|
this.studyTimer && clearInterval(this.studyTimer);
|
|
this.studyTimer && clearInterval(this.studyTimer);
|
|
@@ -1512,6 +1522,10 @@ export default {
|
|
|
this.refPlv.playPause();
|
|
this.refPlv.playPause();
|
|
|
this.refPlv.exitFullScreen();
|
|
this.refPlv.exitFullScreen();
|
|
|
},
|
|
},
|
|
|
|
|
+ closeCamera() {
|
|
|
|
|
+ this.showCamera = false;
|
|
|
|
|
+ this.$refs["camera"].closeCamera();
|
|
|
|
|
+ },
|
|
|
pause() {
|
|
pause() {
|
|
|
this.isPlaying = false;
|
|
this.isPlaying = false;
|
|
|
this.erJianErZaoPauseTip();
|
|
this.erJianErZaoPauseTip();
|