|
@@ -26,12 +26,14 @@
|
|
></image>
|
|
></image>
|
|
</view>
|
|
</view>
|
|
<view v-else>
|
|
<view v-else>
|
|
|
|
+ <!-- v-if="playVID" -->
|
|
<view
|
|
<view
|
|
class="video_box"
|
|
class="video_box"
|
|
style="width: 100%; height: 421rpx"
|
|
style="width: 100%; height: 421rpx"
|
|
- v-if="playVID"
|
|
|
|
|
|
+
|
|
>
|
|
>
|
|
<polyv-player
|
|
<polyv-player
|
|
|
|
+ v-if="playVID"
|
|
id="playerVideo"
|
|
id="playerVideo"
|
|
playerId="playerVideo"
|
|
playerId="playerVideo"
|
|
height="421rpx"
|
|
height="421rpx"
|
|
@@ -92,8 +94,8 @@
|
|
<view v-if="courseTotal > 1" class="toggle_course" @click="changeCourses()">
|
|
<view v-if="courseTotal > 1" class="toggle_course" @click="changeCourses()">
|
|
<image class="img" src="/pages3/static/imgs/toggle.png"></image>
|
|
<image class="img" src="/pages3/static/imgs/toggle.png"></image>
|
|
<view class="toggle_name">切换课程</view>
|
|
<view class="toggle_name">切换课程</view>
|
|
|
|
+ <view class="numbers">共{{ courseTotal }}门</view>
|
|
</view>
|
|
</view>
|
|
- <view v-if="courseTotal > 1" class="numbers">共{{ courseTotal }}门</view>
|
|
|
|
</view>
|
|
</view>
|
|
<!-- <u-row>
|
|
<!-- <u-row>
|
|
<u-col span="10">
|
|
<u-col span="10">
|
|
@@ -563,10 +565,19 @@
|
|
<u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
|
|
<u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
|
|
</view>
|
|
</view>
|
|
<view class="coruse_num">共{{ courseTotal }}门</view>
|
|
<view class="coruse_num">共{{ courseTotal }}门</view>
|
|
|
|
+ <view class="menuSel">
|
|
|
|
+ <scroll-view class="sub_sliper" scroll-x="true" >
|
|
|
|
+ <view v-for="(item,index) in subList" :key="index" style="margin-right: 50rpx;display:inline-block">
|
|
|
|
+ <view class="r_t1" :class="{'nactive': subIndex == index}" @click="cMenu(item, index)">
|
|
|
|
+ {{item.subjectName}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </scroll-view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="check_con">
|
|
<view class="check_con">
|
|
<scroll-view scroll-y="true" style="height: 700rpx;">
|
|
<scroll-view scroll-y="true" style="height: 700rpx;">
|
|
- <view class="course_items" v-for="(item, index) in courseList" :key="index">
|
|
|
|
|
|
+ <view class="course_items" v-for="(item, index) in s_courseList" :key="index">
|
|
<view class="course_lefts">
|
|
<view class="course_lefts">
|
|
<view class="course_title">{{ item.courseName }}</view>
|
|
<view class="course_title">{{ item.courseName }}</view>
|
|
<!-- <view class="course_pros">
|
|
<!-- <view class="course_pros">
|
|
@@ -723,6 +734,9 @@ export default {
|
|
courseTotal: 0,
|
|
courseTotal: 0,
|
|
options: {},
|
|
options: {},
|
|
reStart: false, // 是否显示模块/章/节
|
|
reStart: false, // 是否显示模块/章/节
|
|
|
|
+ s_courseList: [], // 筛选后的
|
|
|
|
+ subList: [],
|
|
|
|
+ subIndex: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -757,33 +771,7 @@ export default {
|
|
// this.getbaseprofiletplists();
|
|
// this.getbaseprofiletplists();
|
|
},
|
|
},
|
|
onUnload() {
|
|
onUnload() {
|
|
- if (this.playSectionId > 0 && this.hasStart) {
|
|
|
|
- //退出提交记录
|
|
|
|
- this.postStudyRecord();
|
|
|
|
- }
|
|
|
|
- //清除正在播放的节ID
|
|
|
|
- // this.$store.commit('setPlayObj',null)
|
|
|
|
- this.$store.commit("setPlaySectionId", { playSectionId: 0 });
|
|
|
|
- this.$store.commit("setPlayChannelId", { playChannelId: 0 });
|
|
|
|
- this.$store.commit("setPlayVID", { playVID: null });
|
|
|
|
- this.closePlv();
|
|
|
|
- // console.log("onUnload");
|
|
|
|
- //移除所有的事件监听器
|
|
|
|
- uni.$off();
|
|
|
|
- clearInterval(this.answerTimer);
|
|
|
|
- if (this.timer) {
|
|
|
|
- clearInterval(this.timer);
|
|
|
|
- }
|
|
|
|
- // console.log(this.lockTimer, "this.lockTimer");
|
|
|
|
- if (this.lockTimer) {
|
|
|
|
- clearInterval(this.lockTimer);
|
|
|
|
- this.$api
|
|
|
|
- .lockDelLock({
|
|
|
|
- action: "jxjy",
|
|
|
|
- })
|
|
|
|
- .then((res) => {});
|
|
|
|
- }
|
|
|
|
- // websocket.sendMsg("delAction");
|
|
|
|
|
|
+ this.originUnload()
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
},
|
|
},
|
|
@@ -800,9 +788,17 @@ export default {
|
|
console.log('埋点')
|
|
console.log('埋点')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ // 点击课程目录
|
|
|
|
+ cMenu(item, index) {
|
|
|
|
+ this.subIndex = index
|
|
|
|
+ if (item.subjectId != 0) {
|
|
|
|
+ this.s_courseList = this.courseList.filter((e) => e.subjectId == item.subjectId)
|
|
|
|
+ } else {
|
|
|
|
+ this.s_courseList = this.courseList
|
|
|
|
+ }
|
|
},
|
|
},
|
|
courseCourseList() {
|
|
courseCourseList() {
|
|
- console.log('ahhhhhhh直播hhhhhh')
|
|
|
|
this.courseList = []
|
|
this.courseList = []
|
|
this.$api.courseCourseList({
|
|
this.$api.courseCourseList({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -814,10 +810,22 @@ export default {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.courseList.push.apply(this.courseList, res.data.rows)
|
|
this.courseList.push.apply(this.courseList, res.data.rows)
|
|
this.courseTotal = res.data.total || 0
|
|
this.courseTotal = res.data.total || 0
|
|
|
|
+
|
|
|
|
+ this.s_courseList = this.courseList
|
|
|
|
+ let allItem = [{ subjectId: 0, subjectName: '所有'}]
|
|
|
|
+ let ids = []
|
|
|
|
+ const newArr = []
|
|
|
|
+ this.courseList.forEach(item => {
|
|
|
|
+ if (ids.indexOf(item.subjectId) == -1) {
|
|
|
|
+ ids.push(item.subjectId)
|
|
|
|
+ newArr.push(item)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.subList = [...allItem, ...newArr]
|
|
|
|
+
|
|
if(res.data.total > 1) {
|
|
if(res.data.total > 1) {
|
|
this.getUserWatchLast()
|
|
this.getUserWatchLast()
|
|
} else if(res.data.total == 1) {
|
|
} else if(res.data.total == 1) {
|
|
- console.log('111->this.courseId', this.courseId)
|
|
|
|
this.originOnShow()
|
|
this.originOnShow()
|
|
this.originOnMount()
|
|
this.originOnMount()
|
|
}
|
|
}
|
|
@@ -845,6 +853,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 原来onshow里面的内容
|
|
originOnShow() {
|
|
originOnShow() {
|
|
this.updateLiveLast(null)
|
|
this.updateLiveLast(null)
|
|
this.courseDetail();
|
|
this.courseDetail();
|
|
@@ -867,7 +876,7 @@ export default {
|
|
let playNextId = `moduleId${option.moduleId}chapterId${
|
|
let playNextId = `moduleId${option.moduleId}chapterId${
|
|
option.chapterId
|
|
option.chapterId
|
|
}sectionId${option.sectionId}${option.isRebuild ? "isRebuild" : ""}`;
|
|
}sectionId${option.sectionId}${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);
|
|
// console.log("this.playNoteVideo");
|
|
// console.log("this.playNoteVideo");
|
|
@@ -877,6 +886,7 @@ export default {
|
|
this.studyRecordQueryLiveLast();
|
|
this.studyRecordQueryLiveLast();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 原来的mouted内容
|
|
originOnMount() {
|
|
originOnMount() {
|
|
uni.$on("changeSection", (oldSectionId) => {
|
|
uni.$on("changeSection", (oldSectionId) => {
|
|
// console.log(this.playVID);
|
|
// console.log(this.playVID);
|
|
@@ -901,7 +911,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 || 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 || item.menuId });
|
|
|
|
+ console.log('清除直播节点胡:', this.moduleId,this.chapterId, this.playSectionId )
|
|
//获取拍照历史
|
|
//获取拍照历史
|
|
this.getPhotoLastRecord();
|
|
this.getPhotoLastRecord();
|
|
this.polyvLiveHistoryChatMsgList();
|
|
this.polyvLiveHistoryChatMsgList();
|
|
@@ -917,6 +931,10 @@ export default {
|
|
//清除录播
|
|
//清除录播
|
|
this.hasStart = false;
|
|
this.hasStart = false;
|
|
this.$store.commit("setPlayVID", { playVID: null });
|
|
this.$store.commit("setPlayVID", { playVID: null });
|
|
|
|
+
|
|
|
|
+ this.moduleId = item.moduleId
|
|
|
|
+ this.chapterId = item.chapterId
|
|
|
|
+ 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;
|
|
@@ -927,6 +945,36 @@ export default {
|
|
});
|
|
});
|
|
this.updateChapterOpen(true);
|
|
this.updateChapterOpen(true);
|
|
},
|
|
},
|
|
|
|
+ // 原来onUnload里面的内容
|
|
|
|
+ originUnload() {
|
|
|
|
+ if (this.playSectionId > 0 && this.hasStart) {
|
|
|
|
+ //退出提交记录
|
|
|
|
+ this.postStudyRecord();
|
|
|
|
+ }
|
|
|
|
+ //清除正在播放的节ID
|
|
|
|
+ // this.$store.commit('setPlayObj',null)
|
|
|
|
+ this.$store.commit("setPlaySectionId", { playSectionId: 0 });
|
|
|
|
+ this.$store.commit("setPlayChannelId", { playChannelId: 0 });
|
|
|
|
+ this.$store.commit("setPlayVID", { playVID: null });
|
|
|
|
+ this.closePlv();
|
|
|
|
+ // console.log("onUnload");
|
|
|
|
+ //移除所有的事件监听器
|
|
|
|
+ uni.$off();
|
|
|
|
+ clearInterval(this.answerTimer);
|
|
|
|
+ if (this.timer) {
|
|
|
|
+ clearInterval(this.timer);
|
|
|
|
+ }
|
|
|
|
+ // console.log(this.lockTimer, "this.lockTimer");
|
|
|
|
+ if (this.lockTimer) {
|
|
|
|
+ clearInterval(this.lockTimer);
|
|
|
|
+ this.$api
|
|
|
|
+ .lockDelLock({
|
|
|
|
+ action: "jxjy",
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {});
|
|
|
|
+ }
|
|
|
|
+ // websocket.sendMsg("delAction");
|
|
|
|
+ },
|
|
changeCourses() {
|
|
changeCourses() {
|
|
this.toggleCourseShow = true
|
|
this.toggleCourseShow = true
|
|
},
|
|
},
|
|
@@ -934,7 +982,10 @@ export default {
|
|
this.toggleCourseShow = false
|
|
this.toggleCourseShow = false
|
|
},
|
|
},
|
|
// 进入学习
|
|
// 进入学习
|
|
- jump(item, index) {
|
|
|
|
|
|
+ async jump(item, index) {
|
|
|
|
+ this.vid = ''
|
|
|
|
+ this.hasStart = true
|
|
|
|
+ await this.originUnload()
|
|
this.courseId = item.courseId
|
|
this.courseId = item.courseId
|
|
this.reStart = false
|
|
this.reStart = false
|
|
this.toggleCourseShow = false
|
|
this.toggleCourseShow = false
|
|
@@ -960,12 +1011,15 @@ export default {
|
|
* 获取最后一次看的节
|
|
* 获取最后一次看的节
|
|
*/
|
|
*/
|
|
studyRecordQueryLiveLast() {
|
|
studyRecordQueryLiveLast() {
|
|
|
|
+ // /study/record/queryLiveLast
|
|
this.$api.studyRecordQueryLiveLast({
|
|
this.$api.studyRecordQueryLiveLast({
|
|
orderGoodsId:this.orderGoodsId,
|
|
orderGoodsId:this.orderGoodsId,
|
|
courseId:this.courseId
|
|
courseId:this.courseId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
console.log(res,'couse')
|
|
console.log(res,'couse')
|
|
if(res.data.data) {
|
|
if(res.data.data) {
|
|
|
|
+ this.moduleId = res.data.data.moduleId
|
|
|
|
+ this.chapterId = res.data.data.chapterId
|
|
if(res.data.data.sectionType == 1) { //录播
|
|
if(res.data.data.sectionType == 1) { //录播
|
|
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 });
|
|
@@ -1459,7 +1513,6 @@ export default {
|
|
async playVideo(item) {
|
|
async playVideo(item) {
|
|
console.log(item);
|
|
console.log(item);
|
|
if (item.sectionType == 3) { // 回放的不播放
|
|
if (item.sectionType == 3) { // 回放的不播放
|
|
- console.log('回放的不播放')
|
|
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (this.timer) {
|
|
if (this.timer) {
|
|
@@ -1476,10 +1529,11 @@ export default {
|
|
}
|
|
}
|
|
this.recordObj = null;
|
|
this.recordObj = null;
|
|
this.recordObj = await this.getRecordLast();
|
|
this.recordObj = await this.getRecordLast();
|
|
|
|
+ console.log('this.recordObj:', this.recordObj)
|
|
this.needSeek = true; //跳转到播放记录
|
|
this.needSeek = true; //跳转到播放记录
|
|
this.startStatus = true;
|
|
this.startStatus = true;
|
|
- console.log('3333333333333')
|
|
|
|
-
|
|
|
|
|
|
+ // 提交学习记录
|
|
|
|
+ this.postStudyRecord(0)
|
|
//获取节笔记
|
|
//获取节笔记
|
|
this.getNoteList();
|
|
this.getNoteList();
|
|
},
|
|
},
|
|
@@ -1508,7 +1562,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);
|
|
@@ -1673,7 +1727,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,
|
|
@@ -1681,14 +1735,13 @@ 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
|
|
),
|
|
),
|
|
};
|
|
};
|
|
if (status > 0) {
|
|
if (status > 0) {
|
|
- console.log(sectionId, "sectionId");
|
|
|
|
data.status = status;
|
|
data.status = status;
|
|
}
|
|
}
|
|
console.log("提交接口", data);
|
|
console.log("提交接口", data);
|