|
@@ -6,9 +6,9 @@
|
|
|
<view class="tag tagColor2" v-if="menuItem.sectionType==2">直播</view>
|
|
|
<view class="tag tagColor3" v-if="menuItem.sectionType==3">回放</view>
|
|
|
<view class="t_content">
|
|
|
- <view v-if="menuItem.sectionType==1" :class="playSectionId==newId?'color1':''">{{menuItem.name}}</view>
|
|
|
- <view v-if="menuItem.sectionType==2" :class="playSectionId==newId?'color2':''">{{menuItem.name}}</view>
|
|
|
- <view v-if="menuItem.sectionType==3" :class="playSectionId==newId?'color3':''">{{menuItem.name}}</view>
|
|
|
+ <view v-if="menuItem.sectionType==1" :class="playSectionId==newId && playNextId==playId?'color1':''">{{menuItem.name}}</view>
|
|
|
+ <view v-if="menuItem.sectionType==2" :class="playSectionId==newId && playNextId==playId?'color2':''">{{menuItem.name}}</view>
|
|
|
+ <view v-if="menuItem.sectionType==3" :class="playSectionId==newId && playNextId==playId?'color3':''">{{menuItem.name}}</view>
|
|
|
<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType==2 && menuItem.liveStartTime">
|
|
|
<view v-if="menuItem.liveStartTime>nowTime">
|
|
|
<text>{{$method.timestampToTime(menuItem.liveStartTime, isDay =false)}}</text>-
|
|
@@ -102,6 +102,7 @@ export default {
|
|
|
return {
|
|
|
nowTime:0,
|
|
|
newId:0,
|
|
|
+ playId:'',
|
|
|
clickLock:false, //点击锁,防止连续点击多次
|
|
|
};
|
|
|
},
|
|
@@ -119,6 +120,7 @@ export default {
|
|
|
let chapterId = this.menuItem.chapterId || 0;
|
|
|
let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
|
|
|
let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
|
|
|
+ this.playId = playNextId;
|
|
|
uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
|
|
|
uni.$once('playNext'+playNextId, (data) => {
|
|
|
//到时会触发每个节的监听事件,只允许当前节的接收
|
|
@@ -262,6 +264,7 @@ export default {
|
|
|
//设置播放的节ID
|
|
|
this.$store.commit('setPlaySectionId', {playSectionId :this.newId});
|
|
|
this.$store.commit('setPlayVID', {playVID :this.menuItem.recordingUrl});
|
|
|
+ this.$store.commit('updatePlayNextId',this.playId)
|
|
|
uni.$emit('levelId', this.levelId)
|
|
|
uni.$emit('getSection', this.menuItem)
|
|
|
uni.$emit('isRebuild',this.isRebuild)
|
|
@@ -294,6 +297,7 @@ export default {
|
|
|
//设置播放的节ID
|
|
|
this.$store.commit('setPlaySectionId', {playSectionId :this.newId});
|
|
|
this.$store.commit('setPlayChannelId', {playChannelId :this.menuItem.liveUrl});
|
|
|
+ this.$store.commit('updatePlayNextId',this.playId)
|
|
|
uni.$emit('levelId', this.levelId)
|
|
|
uni.$emit('getChannel', this.menuItem)
|
|
|
uni.$emit('isRebuild',this.isRebuild)
|
|
@@ -308,7 +312,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- computed: { ...mapGetters(['playSectionId','playChannelId','playVID']) }
|
|
|
+ computed: { ...mapGetters(['playSectionId','playChannelId','playVID','playNextId']) }
|
|
|
|
|
|
};
|
|
|
</script>
|