|
@@ -237,6 +237,7 @@ export default {
|
|
|
this.courseDetail();
|
|
|
this.getGoodsDetail();
|
|
|
this.getAnswerList();
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
var self = this;
|
|
@@ -385,20 +386,30 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
openJY(){
|
|
|
-
|
|
|
- // this.openPhoto();
|
|
|
- // this.getCameraSetting()
|
|
|
- /* wx.openSetting({
|
|
|
- success (res) {
|
|
|
- if(res.authSetting['scope.camera']){
|
|
|
- // self.setData({ showCamera:true})
|
|
|
- }
|
|
|
- }
|
|
|
- }) */
|
|
|
-
|
|
|
-
|
|
|
this.$u.toast('此功能正在开发中');
|
|
|
},
|
|
|
+ //播放笔记视频
|
|
|
+ async playNoteVideo(item) {
|
|
|
+ if (this.timer) {
|
|
|
+ clearInterval(this.timer);
|
|
|
+ }
|
|
|
+ if (this.vid) {
|
|
|
+ //切换视频
|
|
|
+ var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
+ polyvPlayerContext.changeVid(item.recordingUrl);
|
|
|
+ } else {
|
|
|
+ this.vid = item.recordingUrl;
|
|
|
+ }
|
|
|
+ this.recordObj = {studyDuration:item.noteSecond}
|
|
|
+ if (this.recordObj.studyDuration) {
|
|
|
+ this.needSeek = true; //需要跳转到播放记录
|
|
|
+ }
|
|
|
+ this.startStatus = true;
|
|
|
+
|
|
|
+ //获取节笔记
|
|
|
+ this.getNoteList();
|
|
|
+ },
|
|
|
+ //正常播放视频
|
|
|
async playVideo(item) {
|
|
|
if (this.timer) {
|
|
|
clearInterval(this.timer);
|
|
@@ -434,13 +445,23 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
jumpNote(item) {
|
|
|
this.noteId = item.noteId;
|
|
|
- this.$u.toast('即将跳到笔记位置');
|
|
|
- //跳到笔记时刻
|
|
|
- var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
- polyvPlayerContext.seek(item.noteSecond);
|
|
|
- polyvPlayerContext.play();
|
|
|
+ //没视频播放
|
|
|
+ if(this.playSectionId==0){
|
|
|
+ this.$u.toast('即将跳到笔记位置');
|
|
|
+ this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
|
|
|
+ this.playNoteVideo(item);
|
|
|
+ }else{
|
|
|
+ //正在看当前笔记视频
|
|
|
+ this.$u.toast('即将跳到笔记位置');
|
|
|
+ //跳到笔记时刻
|
|
|
+ var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
|
+ polyvPlayerContext.seek(item.noteSecond);
|
|
|
+ polyvPlayerContext.play();
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
postNote() {
|
|
|
let self = this;
|
|
@@ -487,7 +508,12 @@ export default {
|
|
|
},
|
|
|
getNoteList() {
|
|
|
let self = this;
|
|
|
- this.$api.noteList({ sectionId: this.playSectionId, courseId: this.courseId, gradeId: this.gradeId, goodsId: this.goodsId }).then(res => {
|
|
|
+ self.noteList = [];
|
|
|
+ let data = { courseId: this.courseId, gradeId: this.gradeId, goodsId: this.goodsId }
|
|
|
+ if(this.playSectionId>0){
|
|
|
+ data.sectionId = this.playSectionId
|
|
|
+ }
|
|
|
+ this.$api.noteList(data).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
self.noteList = res.data.rows;
|
|
|
}
|
|
@@ -532,8 +558,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
postContent() {
|
|
|
- if (!this.ctxValue) {
|
|
|
+ if (!this.ctxValue||this.ctxValue=='') {
|
|
|
this.$u.toast('请输入内容');
|
|
|
+ return
|
|
|
}
|
|
|
this.postAnswer();
|
|
|
},
|
|
@@ -754,7 +781,8 @@ export default {
|
|
|
console.log(self.gradeId, 698);
|
|
|
self.getMenuList();
|
|
|
self.getReMenuList(); //获取重修目录
|
|
|
-
|
|
|
+ //获取节笔记
|
|
|
+ this.getNoteList();
|
|
|
if (self.goodsData.goodsPlayConfig) {
|
|
|
self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
|
|
|
if (self.goodsPlayConfig.autoPlay > 0) {
|