|
@@ -1298,7 +1298,7 @@ export default {
|
|
|
this.pauseTimer = null;
|
|
|
}
|
|
|
},
|
|
|
- clearBarTimer(){
|
|
|
+ clearBarTimer() {
|
|
|
if (this.barTimer) {
|
|
|
clearInterval(this.barTimer);
|
|
|
this.barTimer = null;
|
|
@@ -1326,7 +1326,7 @@ export default {
|
|
|
this.hasStart = false;
|
|
|
}
|
|
|
this.clearPauseTimer();
|
|
|
- this.clearBarTimer()
|
|
|
+ this.clearBarTimer();
|
|
|
this.timer && clearInterval(this.timer);
|
|
|
if (this.lockTimer) {
|
|
|
clearInterval(this.lockTimer);
|
|
@@ -1942,7 +1942,7 @@ export default {
|
|
|
studyRecordMenuAllList() {
|
|
|
// study/record/menuAllList
|
|
|
return this.$api
|
|
|
- .studyRecordMenuAllList({
|
|
|
+ .studMenuAllList({
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
goodsId: this.goodsId,
|
|
@@ -1950,7 +1950,9 @@ export default {
|
|
|
.then((res) => {
|
|
|
let nowTime = Number(new Date().getTime() / 1000).toFixed(0);
|
|
|
if (res.data.data) {
|
|
|
- this.menuAllList = res.data.data;
|
|
|
+ this.menuAllList = res.data.data.filter(
|
|
|
+ (e) => e.doType != 1 || (e.doType == 2 && e.studyStatus == 1)
|
|
|
+ );
|
|
|
this.livingItem = res.data.data.find(
|
|
|
(item) =>
|
|
|
item.liveStartTime <= nowTime && item.liveEndTime > nowTime
|
|
@@ -2213,15 +2215,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- // /**
|
|
|
- // * 获取业务层次详情
|
|
|
- // */
|
|
|
- // courseBusiness() {
|
|
|
- // this.$api.courseBusiness(this.goodsData.businessId).then((res) => {
|
|
|
- // this.businessData = res.data.data;
|
|
|
- // });
|
|
|
- // },
|
|
|
/**
|
|
|
* 计算tabs宽度
|
|
|
*/
|
|
@@ -2623,7 +2616,6 @@ export default {
|
|
|
} else {
|
|
|
this.vid = item.recordingUrl;
|
|
|
}
|
|
|
- console.log(79798)
|
|
|
this.recordObj = null;
|
|
|
this.recordObj = await this.getRecordLast();
|
|
|
this.needSeek = true; //跳转到播放记录
|
|
@@ -3274,6 +3266,39 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
} else {
|
|
|
+ if (data.doType == 2) {
|
|
|
+ uni.showModal({
|
|
|
+ title: "温馨提示",
|
|
|
+ content: "当前节视频已学完,是否进入 ?",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:
|
|
|
+ "/pages2/class/questionBank?courseId=" +
|
|
|
+ this.courseId +
|
|
|
+ "&gradeId=" +
|
|
|
+ this.gradeId +
|
|
|
+ "&isFromVideo=1&id=" +
|
|
|
+ data.id +
|
|
|
+ "&goodsid=" +
|
|
|
+ this.goodsId +
|
|
|
+ "&moduleId=" +
|
|
|
+ data.moduleId +
|
|
|
+ "&chapterId=" +
|
|
|
+ data.chapterId +
|
|
|
+ "&orderGoodsId=" +
|
|
|
+ this.orderGoodsId +
|
|
|
+ "&type=3" +
|
|
|
+ "&learning=" +
|
|
|
+ data.studyStatus +
|
|
|
+ "&isBackVideo=" +
|
|
|
+ 1,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
uni.showModal({
|
|
|
title: "温馨提示",
|
|
|
content: "当前节视频已学完,继续学习下一节?",
|
|
@@ -3845,7 +3870,6 @@ export default {
|
|
|
loadPlayer() {
|
|
|
const polyvPlayer = window.polyvPlayer;
|
|
|
this.$api.polyvVideoSign(this.vid).then(async (res) => {
|
|
|
- console.log(this.vid,res.data.data.ts,res.data.data.sign)
|
|
|
this.player = await polyvPlayer({
|
|
|
wrap: "#player",
|
|
|
width: "100%",
|
|
@@ -3870,22 +3894,25 @@ export default {
|
|
|
console.log("视频初次播放时触发:");
|
|
|
// #ifdef H5
|
|
|
// h5禁止拖动进度条
|
|
|
- this.clearBarTimer()
|
|
|
- let originTime = this.recordObj.videoCurrentTime || 0;
|
|
|
- if (this.H5isAllowSeek == "on") {
|
|
|
- this.barTimer = setInterval(()=>{
|
|
|
- const currentTime = polyvPlayerContext.j2s_getCurrentTime();
|
|
|
- console.log(currentTime, originTime, 789);
|
|
|
- if (
|
|
|
- currentTime - originTime > 15 ||
|
|
|
- currentTime - originTime < 0
|
|
|
- ) {
|
|
|
- polyvPlayerContext.j2s_seekVideo(originTime);
|
|
|
- } else {
|
|
|
- originTime = currentTime;
|
|
|
- }
|
|
|
- }, 2000);
|
|
|
+ if (!this.$method.isWeixin()) {
|
|
|
+ this.clearBarTimer();
|
|
|
+ let originTime = this.recordObj.videoCurrentTime || 0;
|
|
|
+ if (this.H5isAllowSeek == "on") {
|
|
|
+ this.barTimer = setInterval(() => {
|
|
|
+ const currentTime = polyvPlayerContext.j2s_getCurrentTime();
|
|
|
+ // console.log(currentTime, originTime, 789);
|
|
|
+ if (
|
|
|
+ currentTime - originTime > 15 ||
|
|
|
+ currentTime - originTime < 0
|
|
|
+ ) {
|
|
|
+ polyvPlayerContext.j2s_seekVideo(originTime);
|
|
|
+ } else {
|
|
|
+ originTime = currentTime;
|
|
|
+ }
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
// #endif
|
|
|
this.loadedmetadata();
|
|
|
this.postStudyRecord(0);
|
|
@@ -3895,7 +3922,7 @@ export default {
|
|
|
console.log("视频暂停时触发", this.vid);
|
|
|
this.erJianErZaoPauseTip();
|
|
|
|
|
|
- this.clearBarTimer()
|
|
|
+ this.clearBarTimer();
|
|
|
clearInterval(this.studyTimer);
|
|
|
clearInterval(this.timer);
|
|
|
});
|
|
@@ -3936,6 +3963,7 @@ export default {
|
|
|
this.player.on("s2j_onPlayOver", async () => {
|
|
|
// 当前视频播放完毕时触发
|
|
|
this.hasStart = false;
|
|
|
+ this.clearBarTimer();
|
|
|
clearInterval(this.studyTimer);
|
|
|
clearInterval(this.timer);
|
|
|
uni.showToast({
|