|
@@ -60,9 +60,42 @@
|
|
|
</view>
|
|
|
<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;" v-show="current==1">
|
|
|
<!-- <view v-for="(item, index) in courseItem.courseList" :key="index" > -->
|
|
|
- <view v-for="(courseItem, gTindex) in goodsTeacher" :key="gTindex">
|
|
|
- <view v-for="(item, index) in courseItem.courseList" :key="index">
|
|
|
- <view class="courseItemBox" v-if="item.show && item.show == 1">
|
|
|
+ <!-- 视频课 -->
|
|
|
+ <template v-if="goodsType == 1">
|
|
|
+ <view v-for="(courseItem, gTindex) in goodsTeacher" :key="gTindex">
|
|
|
+ <view v-for="(item, index) in courseItem.courseList" :key="index">
|
|
|
+ <view class="courseItemBox" v-if="item.show && item.show == 1">
|
|
|
+ <view class="courseItem" @click="openCourse(item)">
|
|
|
+ <view class="courseName">{{item.courseName}}</view>
|
|
|
+ <view>
|
|
|
+ <image src="/static/icon/up.png" class="icon_up" v-if="item.down"></image>
|
|
|
+ <image src="/static/icon/down.png" class="icon_up" v-if="!item.down"></image>
|
|
|
+ </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="[States[gTindex] == tindex ? 'nactive' : '']"
|
|
|
+ @click.stop="switchTeacher(tea, tindex, gTindex)">
|
|
|
+ <view >{{ tea.aliasName }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-show="!item.down">
|
|
|
+ <view v-for="(itemM,indexM) in item.menuList" :key="indexM">
|
|
|
+ <courseModule :courseId="itemM.courseId" :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==1" :menuItem="itemM"></courseModule>
|
|
|
+ <courseChapter :courseId="itemM.courseId" :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==2" :isBuy="false" :menuItem="itemM"></courseChapter>
|
|
|
+ <courseSection :courseId="itemM.courseId" v-if="itemM.type==3" :isBuy="false" :menuItem="itemM"></courseSection>
|
|
|
+ <u-line></u-line>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <!-- 直播课 -->
|
|
|
+ <template v-else>
|
|
|
+ <view v-for="(item,index) in courseList" :key="index" >
|
|
|
+ <view class="courseItemBox" >
|
|
|
<view class="courseItem" @click="openCourse(item)">
|
|
|
<view class="courseName">{{item.courseName}}</view>
|
|
|
<view>
|
|
@@ -70,12 +103,6 @@
|
|
|
<image src="/static/icon/down.png" class="icon_up" v-if="!item.down"></image>
|
|
|
</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="[States[gTindex] == tindex ? 'nactive' : '']"
|
|
|
- @click.stop="switchTeacher(tea, tindex, gTindex)">
|
|
|
- <view >{{ tea.aliasName }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
<view v-show="!item.down">
|
|
|
<view v-for="(itemM,indexM) in item.menuList" :key="indexM">
|
|
|
<courseModule :courseId="itemM.courseId" :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==1" :menuItem="itemM"></courseModule>
|
|
@@ -85,11 +112,9 @@
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
+ </template>
|
|
|
</view>
|
|
|
<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;" v-show="current==2">
|
|
|
<!-- <view > -->
|
|
@@ -179,12 +204,14 @@ export default {
|
|
|
goodsTeacher: [],
|
|
|
teaIndex: 0,
|
|
|
States: {0: 0},
|
|
|
+ goodsType: 1, // 1视频2题库 3补考 4前培 6直播
|
|
|
};
|
|
|
},
|
|
|
computed: { ...mapGetters(['userInfo','goodsAuditionConfigIdList','playSectionId','hideBuyState']) },
|
|
|
onLoad(option) {
|
|
|
// this.id => goodsId
|
|
|
this.id = option.id;
|
|
|
+ this.goodsType = option.goodsType
|
|
|
this.getDetail()
|
|
|
this.goodsCourseList()
|
|
|
this.appCommonGoodsCourseModuleFreeExamList();
|
|
@@ -366,7 +393,11 @@ export default {
|
|
|
}
|
|
|
this.courseList = res.data.rows;
|
|
|
this.getFirstCourse();
|
|
|
- this.getCourseTeacher(res.data.rows)
|
|
|
+ // 不同
|
|
|
+ if (this.goodsType == 1) {
|
|
|
+ this.getCourseTeacher(res.data.rows)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
},
|