|
|
@@ -3228,8 +3228,7 @@ export default {
|
|
|
isLastVideo() {
|
|
|
try {
|
|
|
let { sectionId, chapterId } = this.sectionItem;
|
|
|
- let _m = this.menuList;
|
|
|
- let lastVideo = _m.slice(-1)[0].list.slice(-1)[0].list.slice(-1)[0];
|
|
|
+ let lastVideo =this.allVideoList.slice(-1)[0];
|
|
|
return (
|
|
|
sectionId == lastVideo.sectionId && chapterId == lastVideo.chapterId
|
|
|
);
|
|
|
@@ -3246,9 +3245,6 @@ export default {
|
|
|
this.gradeId = this.$route.query.gradeId;
|
|
|
this.sectionItem = this.$route.query;
|
|
|
let isOther = this.$route.query.isOther || "";
|
|
|
- // setTimeout(() => {
|
|
|
- // this.playNextVideo();
|
|
|
- // }, 2000);
|
|
|
|
|
|
if (isOther) {
|
|
|
const confirmText = [
|
|
|
@@ -3383,10 +3379,15 @@ export default {
|
|
|
...mapMutations(["getCartCount"]),
|
|
|
...mapActions(["getUserInfo"]),
|
|
|
pauseVideo() {
|
|
|
+ let _p = this.player
|
|
|
if (document.visibilityState === "hidden") {
|
|
|
- this.player && this.player.j2s_pauseVideo();
|
|
|
- }else{
|
|
|
- this.player && this.player.j2s_resumeVideo();
|
|
|
+ _p && _p .j2s_pauseVideo();
|
|
|
+ } else {
|
|
|
+ if (_p) {
|
|
|
+ if(parseInt(_p .j2s_getCurrentTime())<_p .j2s_getDuration()){
|
|
|
+ this.player.j2s_resumeVideo();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
openChangeCourseBoxs() {
|
|
|
@@ -5188,8 +5189,8 @@ export default {
|
|
|
isRebuild ? (item.isRebuild = 1) : (item.menuType = 2);
|
|
|
}
|
|
|
menuItem.list = res.data;
|
|
|
- if(isAuto){
|
|
|
- return Promise.resolve(res.data)
|
|
|
+ if (isAuto) {
|
|
|
+ return Promise.resolve(res.data);
|
|
|
}
|
|
|
if (isRebuild) return;
|
|
|
if (status) {
|
|
|
@@ -5379,7 +5380,7 @@ export default {
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
- console.log("直播的用户学习日志:", res);
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
// 节卷不需要控制
|
|
|
@@ -5613,12 +5614,6 @@ export default {
|
|
|
|
|
|
let learnNum = await this.goodsTodayStudySectionNum(option);
|
|
|
let hasLearn = await this.gradeCheckGoodsStudy(option);
|
|
|
- console.log(hasLearn, "hasLearn");
|
|
|
- console.log(learnNum, "learnNum");
|
|
|
- console.log(
|
|
|
- this.goodsData.sectionMaxNum,
|
|
|
- "this.goodsData.sectionMaxNum"
|
|
|
- );
|
|
|
if (this.goodsData.sectionMaxNum > 0) {
|
|
|
if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
|
|
|
this.clickLock = false;
|
|
|
@@ -5729,9 +5724,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
async playVideo(option) {
|
|
|
- console.log("asdhsuohfosufgasoug", option);
|
|
|
if (option.sectionType == 3) {
|
|
|
- console.log("huifang");
|
|
|
// 回放
|
|
|
if (Object.keys(this.clickSectionItem).length) {
|
|
|
//this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
|
|
|
@@ -6025,7 +6018,7 @@ export default {
|
|
|
this.getResource(playChapter[playVideoIndex + 1], 1);
|
|
|
} else if (playChapterIndex < chapterList.length - 1) {
|
|
|
// 不是最后一杰
|
|
|
- let nextChapter = chapterList[playChapterIndex + 1].list
|
|
|
+ let nextChapter = chapterList[playChapterIndex + 1].list;
|
|
|
if (nextChapter.length) {
|
|
|
this.getResource(nextChapter.list[0], 1);
|
|
|
} else {
|
|
|
@@ -6035,7 +6028,7 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
// 章最后一个视频 跳去下一章
|
|
|
- let nextChapterList = this.menuList[moduleIndex + 1].list
|
|
|
+ let nextChapterList = this.menuList[moduleIndex + 1].list;
|
|
|
if (!nextChapterList.length) {
|
|
|
this.needOpen = true;
|
|
|
nextChapterList = await this.openModule(
|
|
|
@@ -6044,9 +6037,9 @@ export default {
|
|
|
true
|
|
|
);
|
|
|
}
|
|
|
- if(nextChapterList[0].list.length){
|
|
|
+ if (nextChapterList[0].list.length) {
|
|
|
this.getResource(nextChapterList[0].list[0], 1);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
let data = await this.openChapter(nextChapterList[0]);
|
|
|
this.getResource(data[0], 1);
|
|
|
}
|
|
|
@@ -6066,7 +6059,6 @@ export default {
|
|
|
this.photoHistoryList.length == 0
|
|
|
) {
|
|
|
//开启直播拍照
|
|
|
-
|
|
|
polyvPlayerContext.j2s_pauseVideo();
|
|
|
this.openPhoto();
|
|
|
} else {
|
|
|
@@ -6111,6 +6103,7 @@ export default {
|
|
|
getPhotoLastRecord() {
|
|
|
return new Promise((resolve) => {
|
|
|
let self = this;
|
|
|
+ this.photoConfig = false;
|
|
|
let data = {
|
|
|
sectionId: parseInt(self.playSectionId),
|
|
|
goodsId: parseInt(self.goodsId),
|
|
|
@@ -6119,8 +6112,7 @@ export default {
|
|
|
chapterId: parseInt(self.chapterId),
|
|
|
moduleId: parseInt(self.moduleId),
|
|
|
};
|
|
|
- this.$request.getPhotoLastRecord(data).then((res) => {
|
|
|
- console.log(res, 666);
|
|
|
+ this.$request.getPhotoLastRecord(data).then((res) => {;
|
|
|
//清空历史数据
|
|
|
self.photoHistoryList = [];
|
|
|
this.photoIndex = 0;
|
|
|
@@ -6133,7 +6125,6 @@ export default {
|
|
|
self.photoHistoryList.push(res.data[i].photoIndex);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
resolve();
|
|
|
});
|
|
|
});
|
|
|
@@ -6213,6 +6204,9 @@ export default {
|
|
|
|
|
|
//配置随机拍照时间
|
|
|
configPhoto() {
|
|
|
+ if(this.photoList.length){
|
|
|
+ return
|
|
|
+ }
|
|
|
var polyvPlayerContext = this.player;
|
|
|
let totalVideoTime = polyvPlayerContext.j2s_getDuration();
|
|
|
let duration = polyvPlayerContext.j2s_getCurrentTime();
|
|
|
@@ -6260,7 +6254,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log(this.photoList, "随机拍照时间数组11", photoNum);
|
|
|
this.postCoursePhotoRecord(true); //提交随机拍照时间数组
|
|
|
}
|
|
|
console.log(this.photoList, "随机拍照时间数组");
|
|
|
@@ -6811,7 +6804,6 @@ export default {
|
|
|
moduleId: parseInt(self.moduleId),
|
|
|
};
|
|
|
self.$request.recordLast(data).then((res) => {
|
|
|
- console.log(res.data, "res.datares.datares.datares.datares.data");
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
|
@@ -6878,7 +6870,6 @@ export default {
|
|
|
this.$request
|
|
|
.reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
|
|
|
.then(async (res) => {
|
|
|
- console.log("--asfsdgshfduofhdug", res.rows, this.menuList);
|
|
|
for (let i = 0; i < res.rows.length; i++) {
|
|
|
let item = res.rows[i];
|
|
|
item.id = item.menuId;
|
|
|
@@ -6889,11 +6880,6 @@ export default {
|
|
|
item.parent = this.menuList;
|
|
|
}
|
|
|
self.menuList = res.rows;
|
|
|
- console.log(
|
|
|
- "==============self.menuList===",
|
|
|
- res.rows,
|
|
|
- self.menuList
|
|
|
- );
|
|
|
if (
|
|
|
(this.sectionItem.recordingUrl || this.sectionItem.liveUrl) &&
|
|
|
this.needOpenNew
|
|
|
@@ -7280,13 +7266,11 @@ export default {
|
|
|
this.goodsTeacher.push(data);
|
|
|
});
|
|
|
}
|
|
|
- console.log(this.goodsTeacher, "this.goodsTeacher");
|
|
|
this.goodsTeacher.forEach((item) => {
|
|
|
if (item.courseList.some((x) => x.courseId == this.courseId)) {
|
|
|
this.teacherList = item.teaList;
|
|
|
}
|
|
|
});
|
|
|
- console.log(this.teacherList, "this.teacherList");
|
|
|
});
|
|
|
this.courseList.push(...res.rows);
|
|
|
this.courseTotal = res.total;
|