Browse Source

fix 自动拍下一节

he2802 3 năm trước cách đây
mục cha
commit
5cff497da7
1 tập tin đã thay đổi với 6 bổ sung5 xóa
  1. 6 5
      components/course/courseSection.vue

+ 6 - 5
components/course/courseSection.vue

@@ -102,6 +102,7 @@ export default {
 		
 		uni.$on('playNext', () => {
 			//到时会触发每个节的监听事件,只允许当前节的接收
+			let self = this
 			if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId)){
 				//重修存在下一节
 				uni.showModal({
@@ -110,14 +111,14 @@ export default {
 				    success: function (res) {
 				        if (res.confirm) {
 				            console.log('用户点击确定');
-							let nextId= this.nextMenuItem.sectionId>0?this.nextMenuItem.sectionId:this.nextMenuItem.menuId
+							let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
 							//设置播放的节ID
-							this.$store.commit('setPlaySectionId', {playSectionId  :nextId});
-							this.$store.commit('setPlayVID', {playVID  :this.nextMenuItem.recordingUrl});
-							let ids = this.levelId.split('-');
+							self.$store.commit('setPlaySectionId', {playSectionId  :nextId});
+							self.$store.commit('setPlayVID', {playVID  :self.nextMenuItem.recordingUrl});
+							let ids = self.levelId.split('-');
 							ids[2] = nextId 
 							uni.$emit('levelId', ids.join('-'))
-							uni.$emit('getSection', this.nextMenuItem)
+							uni.$emit('getSection', self.nextMenuItem)
 							
 				        }
 				    }