|
@@ -835,7 +835,7 @@ export default {
|
|
let playNextId = `moduleId${this.option.moduleId}chapterId${
|
|
let playNextId = `moduleId${this.option.moduleId}chapterId${
|
|
this.option.chapterId
|
|
this.option.chapterId
|
|
}sectionId${this.option.sectionId}${this.option.isRebuild ? "isRebuild" : ""}`;
|
|
}sectionId${this.option.sectionId}${this.option.isRebuild ? "isRebuild" : ""}`;
|
|
- this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
|
|
|
|
|
|
+ this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
|
|
this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
|
|
this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
|
|
this.$store.commit("updatePlayNextId", playNextId);
|
|
this.$store.commit("updatePlayNextId", playNextId);
|
|
|
|
|
|
@@ -872,11 +872,11 @@ export default {
|
|
this.photoConfig = false;
|
|
this.photoConfig = false;
|
|
this.photoIndex = 0;
|
|
this.photoIndex = 0;
|
|
this.sectionItem = item;
|
|
this.sectionItem = item;
|
|
- this.moduleId = item.moduleId
|
|
|
|
- this.chapterId = item.chapterId
|
|
|
|
|
|
+ this.moduleId = item.moduleId || null
|
|
|
|
+ this.chapterId = item.chapterId || null
|
|
|
|
|
|
this.$store.commit("setPlayChannelId", { playChannelId: 0 });
|
|
this.$store.commit("setPlayChannelId", { playChannelId: 0 });
|
|
- this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
|
|
|
|
|
|
+ this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
|
|
console.log('清除直播节点胡:', this.moduleId,this.chapterId, this.playSectionId )
|
|
console.log('清除直播节点胡:', this.moduleId,this.chapterId, this.playSectionId )
|
|
// this.postStudyRecord(0)
|
|
// this.postStudyRecord(0)
|
|
//获取拍照历史
|
|
//获取拍照历史
|
|
@@ -890,14 +890,14 @@ export default {
|
|
this.chapterId = arr[1];
|
|
this.chapterId = arr[1];
|
|
});
|
|
});
|
|
uni.$on("getChannel", (item) => {
|
|
uni.$on("getChannel", (item) => {
|
|
- console.log('--->清除录播录播清除录播录播')
|
|
|
|
|
|
+ // console.log('--->清除录播录播清除录播录播')
|
|
//清除录播
|
|
//清除录播
|
|
this.hasStart = false;
|
|
this.hasStart = false;
|
|
this.$store.commit("setPlayVID", { playVID: null });
|
|
this.$store.commit("setPlayVID", { playVID: null });
|
|
|
|
|
|
this.moduleId = item.moduleId
|
|
this.moduleId = item.moduleId
|
|
this.chapterId = item.chapterId
|
|
this.chapterId = item.chapterId
|
|
- this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
|
|
|
|
|
|
+ this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
|
|
this.getPhotoLastRecord();
|
|
this.getPhotoLastRecord();
|
|
this.playChannel(item);
|
|
this.playChannel(item);
|
|
this.channelItem = item;
|
|
this.channelItem = item;
|
|
@@ -910,7 +910,6 @@ export default {
|
|
},
|
|
},
|
|
// 原来onUnload里面的内容
|
|
// 原来onUnload里面的内容
|
|
originUnload() {
|
|
originUnload() {
|
|
- console.log('playSectionId', this.playSectionId)
|
|
|
|
if (this.playSectionId > 0 && this.hasStart) {
|
|
if (this.playSectionId > 0 && this.hasStart) {
|
|
//退出提交记录
|
|
//退出提交记录
|
|
console.log('退出提交记录sfhasdoufsou敖德萨所多', this.courseId)
|
|
console.log('退出提交记录sfhasdoufsou敖德萨所多', this.courseId)
|
|
@@ -1166,7 +1165,7 @@ export default {
|
|
this.moduleId = res.data.data.moduleId
|
|
this.moduleId = res.data.data.moduleId
|
|
this.chapterId = res.data.data.chapterId
|
|
this.chapterId = res.data.data.chapterId
|
|
if(res.data.data.sectionType == 1) { //录播
|
|
if(res.data.data.sectionType == 1) { //录播
|
|
- console.log('录播录播录播')
|
|
|
|
|
|
+ // console.log('录播录播录播')
|
|
this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
|
|
this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
|
|
this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
|
|
this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
|
|
|
|
|
|
@@ -1958,18 +1957,26 @@ export default {
|
|
this.getNoteList();
|
|
this.getNoteList();
|
|
},
|
|
},
|
|
getRecordLast() {
|
|
getRecordLast() {
|
|
- let self = this;
|
|
|
|
return new Promise((resolve) => {
|
|
return new Promise((resolve) => {
|
|
let data = {
|
|
let data = {
|
|
gradeId: this.gradeId || this.gradeId == 0 ? Number(this.gradeId) : null,
|
|
gradeId: this.gradeId || this.gradeId == 0 ? Number(this.gradeId) : null,
|
|
goodsId: this.goodsId || this.goodsId == 0 ? Number(this.goodsId) : null,
|
|
goodsId: this.goodsId || this.goodsId == 0 ? Number(this.goodsId) : null,
|
|
- sectionId: this.playSectionId || this.playSectionId == 0 ? Number(this.playSectionId) : null,
|
|
|
|
|
|
+ sectionId: this.playSectionId || 0,
|
|
courseId: this.courseId || this.courseId == 0 ? Number(this.courseId) : null,
|
|
courseId: this.courseId || this.courseId == 0 ? Number(this.courseId) : null,
|
|
- chapterId: this.chapterId || this.chapterId == 0 ? parseInt(this.chapterId) : null,
|
|
|
|
- moduleId: this.moduleId || this.moduleId == 0 ? parseInt(this.moduleId) : null,
|
|
|
|
|
|
+ chapterId: this.chapterId || 0,
|
|
|
|
+ moduleId: this.moduleId || 0,
|
|
orderGoodsId: this.orderGoodsId,
|
|
orderGoodsId: this.orderGoodsId,
|
|
};
|
|
};
|
|
- self.$api.recordLast(data).then((res) => {
|
|
|
|
|
|
+ // if (this.playSectionId || this.playSectionId == 0) {
|
|
|
|
+ // data.sectionId = Number(this.playSectionId)
|
|
|
|
+ // }
|
|
|
|
+ // if (this.chapterId || this.chapterId == 0) {
|
|
|
|
+ // data.chapterId = parseInt(this.chapterId)
|
|
|
|
+ // }
|
|
|
|
+ // if (this.moduleId || this.moduleId == 0) {
|
|
|
|
+ // data.moduleId = parseInt(this.moduleId)
|
|
|
|
+ // }
|
|
|
|
+ this.$api.recordLast(data).then((res) => {
|
|
resolve(res.data.data);
|
|
resolve(res.data.data);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
@@ -1982,7 +1989,7 @@ export default {
|
|
console.log("即将跳到笔记位置1");
|
|
console.log("即将跳到笔记位置1");
|
|
this.$u.toast("即将跳到笔记位置");
|
|
this.$u.toast("即将跳到笔记位置");
|
|
this.$store.commit("setPlaySectionId", {
|
|
this.$store.commit("setPlaySectionId", {
|
|
- playSectionId: item.sectionId,
|
|
|
|
|
|
+ playSectionId: item.sectionId || item.menuId,
|
|
});
|
|
});
|
|
this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
|
|
this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
|
|
this.playNoteVideo(item);
|
|
this.playNoteVideo(item);
|
|
@@ -2184,7 +2191,7 @@ export default {
|
|
let data = {
|
|
let data = {
|
|
fromPlat: 1, //来源平台 1小程序 2网站
|
|
fromPlat: 1, //来源平台 1小程序 2网站
|
|
photo: self.ossAvatarUrl,
|
|
photo: self.ossAvatarUrl,
|
|
- sectionId: parseInt(sectionId),
|
|
|
|
|
|
+ sectionId: sectionId || 0,
|
|
goodsId: parseInt(self.goodsId),
|
|
goodsId: parseInt(self.goodsId),
|
|
courseId: parseInt(self.courseId),
|
|
courseId: parseInt(self.courseId),
|
|
orderGoodsId: this.orderGoodsId,
|
|
orderGoodsId: this.orderGoodsId,
|
|
@@ -2192,8 +2199,8 @@ export default {
|
|
PlayDuration > 0 ? PlayDuration : self.studyDuration
|
|
PlayDuration > 0 ? PlayDuration : self.studyDuration
|
|
),
|
|
),
|
|
gradeId: parseInt(self.gradeId),
|
|
gradeId: parseInt(self.gradeId),
|
|
- chapterId: parseInt(self.chapterId),
|
|
|
|
- moduleId: parseInt(self.moduleId),
|
|
|
|
|
|
+ chapterId: this.chapterId || 0,
|
|
|
|
+ moduleId: this.moduleId || 0,
|
|
videoCurrentTime: parseInt(
|
|
videoCurrentTime: parseInt(
|
|
currentTime > 0 ? currentTime : self.studyDuration
|
|
currentTime > 0 ? currentTime : self.studyDuration
|
|
),
|
|
),
|
|
@@ -2201,8 +2208,7 @@ export default {
|
|
if (status > 0) {
|
|
if (status > 0) {
|
|
data.status = status;
|
|
data.status = status;
|
|
}
|
|
}
|
|
- console.log("提交接口", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
|
|
|
|
- // return
|
|
|
|
|
|
+ console.log("提交接口:", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
|
|
this.$api.studyRecord(data).then((res) => {
|
|
this.$api.studyRecord(data).then((res) => {
|
|
console.log('提交接口的结果:', res)
|
|
console.log('提交接口的结果:', res)
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|