|
@@ -99,6 +99,30 @@ export default {
|
|
|
mounted() {
|
|
|
this.nowTime = Number(new Date().getTime()/1000).toFixed(0)
|
|
|
this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
|
|
|
+
|
|
|
+ uni.$on('playNext', () => {
|
|
|
+ //到时会触发每个节的监听事件,只允许当前节的接收
|
|
|
+ if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId)){
|
|
|
+ //重修存在下一节
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否播放下一节',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ console.log('用户点击确定');
|
|
|
+ let nextId= this.nextMenuItem.sectionId>0?this.nextMenuItem.sectionId:this.nextMenuItem.menuId
|
|
|
+ //设置播放的节ID
|
|
|
+ this.$store.commit('setPlaySectionId', {playSectionId :nextId});
|
|
|
+ this.$store.commit('setPlayVID', {playVID :this.nextMenuItem.recordingUrl});
|
|
|
+ uni.$emit('getSection', this.nextMenuItem)
|
|
|
+ let ids = this.levelId.split('-');
|
|
|
+ ids[2] = nextId
|
|
|
+ uni.$emit('levelId', ids.join('-'))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
getVideo(){
|