|
@@ -1166,7 +1166,9 @@ export default {
|
|
if (this.playSecIsLearn && this.erJianErZao) {
|
|
if (this.playSecIsLearn && this.erJianErZao) {
|
|
this.pauseTime = Date.now();
|
|
this.pauseTime = Date.now();
|
|
this.pauseTimer = setInterval(() => {
|
|
this.pauseTimer = setInterval(() => {
|
|
|
|
+ console.log("暂停时间", Date.now() - this.pauseTime);
|
|
if (Date.now() - this.pauseTime > 15 * 60 * 1000) {
|
|
if (Date.now() - this.pauseTime > 15 * 60 * 1000) {
|
|
|
|
+ // 15 * 60 * 1000
|
|
let text = this.photoPopup ? "拍照停留" : "暂停";
|
|
let text = this.photoPopup ? "拍照停留" : "暂停";
|
|
this.photoPopup = false;
|
|
this.photoPopup = false;
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -1238,6 +1240,7 @@ export default {
|
|
oldSectionId
|
|
oldSectionId
|
|
);
|
|
);
|
|
this.studyTimer && clearInterval(this.studyTimer); // 清除定时器
|
|
this.studyTimer && clearInterval(this.studyTimer); // 清除定时器
|
|
|
|
+ this.clearPauseTimer();
|
|
this.hasStart = false;
|
|
this.hasStart = false;
|
|
this.photoConfig = false;
|
|
this.photoConfig = false;
|
|
this.photoIndex = 0;
|
|
this.photoIndex = 0;
|
|
@@ -1272,19 +1275,11 @@ export default {
|
|
this.$store.commit("setPlaySectionId", {
|
|
this.$store.commit("setPlaySectionId", {
|
|
playSectionId: item.sectionId || item.menuId,
|
|
playSectionId: item.sectionId || item.menuId,
|
|
});
|
|
});
|
|
- console.log(
|
|
|
|
- "清除直播节点胡:",
|
|
|
|
- this.moduleId,
|
|
|
|
- this.chapterId,
|
|
|
|
- this.playSectionId,
|
|
|
|
- this.hasStart
|
|
|
|
- );
|
|
|
|
//获取拍照历史
|
|
//获取拍照历史
|
|
this.getPhotoLastRecord();
|
|
this.getPhotoLastRecord();
|
|
this.playVideo(item);
|
|
this.playVideo(item);
|
|
});
|
|
});
|
|
uni.$on("levelId", (item) => {
|
|
uni.$on("levelId", (item) => {
|
|
- console.log("点击节获取的各层级ID", item);
|
|
|
|
let arr = item.split("-");
|
|
let arr = item.split("-");
|
|
//点击节获取的各层级ID
|
|
//点击节获取的各层级ID
|
|
this.moduleId = arr[0];
|
|
this.moduleId = arr[0];
|
|
@@ -1312,6 +1307,7 @@ export default {
|
|
},
|
|
},
|
|
clearPauseTimer() {
|
|
clearPauseTimer() {
|
|
if (this.pauseTimer) {
|
|
if (this.pauseTimer) {
|
|
|
|
+ this.pauseTime = 0;
|
|
clearInterval(this.pauseTimer);
|
|
clearInterval(this.pauseTimer);
|
|
this.pauseTimer = null;
|
|
this.pauseTimer = null;
|
|
}
|
|
}
|
|
@@ -2127,7 +2123,6 @@ export default {
|
|
return {};
|
|
return {};
|
|
},
|
|
},
|
|
loadedmetadata(event) {
|
|
loadedmetadata(event) {
|
|
- console.log(465456)
|
|
|
|
if (this.hasStart) {
|
|
if (this.hasStart) {
|
|
// 防止loadedmetadata事件第二次触发
|
|
// 防止loadedmetadata事件第二次触发
|
|
return;
|
|
return;
|
|
@@ -3074,7 +3069,6 @@ export default {
|
|
async onStateChange(newstate, oldstate) {
|
|
async onStateChange(newstate, oldstate) {
|
|
polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
if (newstate.detail.newstate == "playing") {
|
|
if (newstate.detail.newstate == "playing") {
|
|
- this.pauseTime = 0;
|
|
|
|
if (this.needSeek) {
|
|
if (this.needSeek) {
|
|
// var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
// var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
if (this.recordObj.videoCurrentTime) {
|
|
if (this.recordObj.videoCurrentTime) {
|
|
@@ -3340,7 +3334,7 @@ export default {
|
|
// console.log('拍照确定提交', this.photoHistoryList);
|
|
// console.log('拍照确定提交', this.photoHistoryList);
|
|
this.postStudyRecord(); //提交记录
|
|
this.postStudyRecord(); //提交记录
|
|
if (this.erJianErZao && this.isReach) {
|
|
if (this.erJianErZao && this.isReach) {
|
|
- console.log("1校验")
|
|
|
|
|
|
+ console.log("1校验");
|
|
await this.postStudyRecord(1);
|
|
await this.postStudyRecord(1);
|
|
this.photoPopup = false;
|
|
this.photoPopup = false;
|
|
this.uploadLock = false;
|
|
this.uploadLock = false;
|
|
@@ -3739,7 +3733,6 @@ export default {
|
|
// 播放视频
|
|
// 播放视频
|
|
loadPlayer() {
|
|
loadPlayer() {
|
|
const polyvPlayer = window.polyvPlayer;
|
|
const polyvPlayer = window.polyvPlayer;
|
|
- this.pauseTime = 0;
|
|
|
|
this.$api.polyvVideoSign(this.vid).then(async (res) => {
|
|
this.$api.polyvVideoSign(this.vid).then(async (res) => {
|
|
this.player = await polyvPlayer({
|
|
this.player = await polyvPlayer({
|
|
wrap: "#player",
|
|
wrap: "#player",
|
|
@@ -3768,7 +3761,6 @@ export default {
|
|
});
|
|
});
|
|
|
|
|
|
polyvPlayerContext = this.player;
|
|
polyvPlayerContext = this.player;
|
|
- console.log("this.player:", this.player);
|
|
|
|
|
|
|
|
this.player.on("s2j_onPlayStart", async (vid) => {
|
|
this.player.on("s2j_onPlayStart", async (vid) => {
|
|
// 视频初次播放时触发
|
|
// 视频初次播放时触发
|
|
@@ -3828,8 +3820,8 @@ export default {
|
|
//开始播放
|
|
//开始播放
|
|
this.timer && clearInterval(this.timer);
|
|
this.timer && clearInterval(this.timer);
|
|
if (this.playSecIsLearn && (this.erJianErZao || this.photoNum > 0)) {
|
|
if (this.playSecIsLearn && (this.erJianErZao || this.photoNum > 0)) {
|
|
- this.isReach = false;
|
|
|
|
this.clearPauseTimer();
|
|
this.clearPauseTimer();
|
|
|
|
+ this.isReach = false;
|
|
this.timer = setInterval(this.timeEvent, 1000); //定时器
|
|
this.timer = setInterval(this.timeEvent, 1000); //定时器
|
|
}
|
|
}
|
|
|
|
|