|
@@ -576,7 +576,7 @@
|
|
|
</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)">{{tea.aliasName}}</view>
|
|
|
+ >{{tea.aliasName}}</view>
|
|
|
</view>
|
|
|
<view class="course_pros">
|
|
|
学习进度
|
|
@@ -727,7 +727,7 @@ export default {
|
|
|
subIndex: 0,
|
|
|
goodsTeacher: [],
|
|
|
teacherList: [],
|
|
|
- teaIndex: 0,
|
|
|
+ // teaIndex: 0,
|
|
|
teacherIndex: 0,
|
|
|
newActiveSubjectId: "", //当前选中ID
|
|
|
};
|
|
@@ -1076,27 +1076,27 @@ export default {
|
|
|
this.toggleCourseShow = false
|
|
|
},
|
|
|
//切换老师
|
|
|
- switchTeacher(data, tindex){
|
|
|
- console.log(data,'data');
|
|
|
- this.teaIndex = tindex
|
|
|
- this.goodsTeacher.forEach((item,index) => {
|
|
|
- if(item.teaList && item.teaList.length > 0){
|
|
|
- let list = item.teaList.filter(x => x.courseId == data.courseId)
|
|
|
- if(list && list.length > 0){
|
|
|
- item.courseList.forEach((course,courseIndex) => {
|
|
|
- if(course.courseId == data.courseId){
|
|
|
- console.log(index,'index');
|
|
|
- console.log(courseIndex,'courseIndex');
|
|
|
- this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",1)
|
|
|
- }else{
|
|
|
- this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",0)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- console.log('切换后的this.goodsTeacher, ', this.goodsTeacher)
|
|
|
- },
|
|
|
+ // switchTeacher(data, tindex){
|
|
|
+ // console.log(data,'data');
|
|
|
+ // this.teaIndex = tindex
|
|
|
+ // this.goodsTeacher.forEach((item,index) => {
|
|
|
+ // if(item.teaList && item.teaList.length > 0){
|
|
|
+ // let list = item.teaList.filter(x => x.courseId == data.courseId)
|
|
|
+ // if(list && list.length > 0){
|
|
|
+ // item.courseList.forEach((course,courseIndex) => {
|
|
|
+ // if(course.courseId == data.courseId){
|
|
|
+ // console.log(index,'index');
|
|
|
+ // console.log(courseIndex,'courseIndex');
|
|
|
+ // this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",1)
|
|
|
+ // }else{
|
|
|
+ // this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",0)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // console.log('切换后的this.goodsTeacher, ', this.goodsTeacher)
|
|
|
+ // },
|
|
|
async activeFunc(item, index) {
|
|
|
console.log('item', item, this.goodsTeacher)
|
|
|
this.teacherIndex = index
|
|
@@ -1130,7 +1130,7 @@ export default {
|
|
|
await this.originUnload()
|
|
|
|
|
|
if (type) {
|
|
|
- this.teacherIndex = this.teaIndex
|
|
|
+ this.teacherIndex = 0
|
|
|
this.goodsTeacher.forEach((citem) => {
|
|
|
if(citem.courseList.some(x => x.courseId == item.courseId)){
|
|
|
this.teacherList = citem.teaList
|