|
@@ -71,8 +71,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="courseItem.teaList && courseItem.teaList.length > 0" class='teacher_names'>
|
|
|
- <view v-for="(tea, tindex) in courseItem.teaList" :key="tindex" class="names" :class="{nactive: teaIndex == tindex}" @click.stop="switchTeacher(tea, tindex)">
|
|
|
- <view>{{ tea.aliasName }}</view>
|
|
|
+ <view v-for="(tea, tindex) in courseItem.teaList" :key="tindex" class="names" :class="[States[gTindex] == tindex ? 'nactive' : '']"
|
|
|
+ @click.stop="switchTeacher(tea, tindex, gTindex)">
|
|
|
+ <view >{{ tea.aliasName }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-show="!item.down">
|
|
@@ -177,6 +178,7 @@ export default {
|
|
|
hadBuyCourse: {}, // 已购买课程信息
|
|
|
goodsTeacher: [],
|
|
|
teaIndex: 0,
|
|
|
+ States: {0: 0},
|
|
|
};
|
|
|
},
|
|
|
computed: { ...mapGetters(['userInfo','goodsAuditionConfigIdList','playSectionId','hideBuyState']) },
|
|
@@ -467,8 +469,9 @@ export default {
|
|
|
console.log(this.goodsTeacher,'this.goodsTeacher');
|
|
|
},
|
|
|
//切换老师
|
|
|
- switchTeacher(data, tindex){
|
|
|
+ switchTeacher(data, tindex, gTindex){
|
|
|
// console.log(data,'data');
|
|
|
+ this.States[gTindex] = tindex
|
|
|
this.teaIndex = tindex
|
|
|
this.goodsTeacher.forEach((item,index) => {
|
|
|
if(item.teaList && item.teaList.length > 0){
|