|
@@ -23,9 +23,18 @@
|
|
|
</view>
|
|
|
<!-- 目录内容 -->
|
|
|
<view v-if="activeTab == '目录'" class="course-content">
|
|
|
- <catalogue ref="catalogueRef" @kejianInfo='getKejianInfo' :options="kejianUserVo"
|
|
|
+ <catalogue ref="catalogueRef" @kejianInfo='getKejianInfo' :options="kejianUserVo"
|
|
|
:current-video="currentVideo"></catalogue>
|
|
|
</view>
|
|
|
+ <view v-if="activeTab == '介绍'" class="course-content">
|
|
|
+ <view v-if="!kechengData.intro" class="s-kehceng-default">
|
|
|
+ <view>
|
|
|
+ <img :src="jieshaoImg">
|
|
|
+ <text>还没有介绍</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-else v-html="kechengData.intro" class="kecheng-tab-jieshao"></view>
|
|
|
+ </view>
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
@@ -48,6 +57,8 @@
|
|
|
const activeTab = ref('');
|
|
|
let kcId = ref('');
|
|
|
let kejianUserVo = ref(null);
|
|
|
+ let jieshaoImg = ref('/static/images/kecheng/kecheng-introduce.svg');
|
|
|
+ let kechengData = ref(null);
|
|
|
// 当前播放信息
|
|
|
const currentVideo = ref({
|
|
|
url: '',
|
|
@@ -74,16 +85,17 @@
|
|
|
console.log('res', res);
|
|
|
activeTab.value = '目录'
|
|
|
kejianUserVo.value = res.data.kejianUserVo
|
|
|
+ kechengData.value = res.data
|
|
|
})
|
|
|
}
|
|
|
|
|
|
function getKejianInfo(data) {
|
|
|
console.log('data', data.url);
|
|
|
-
|
|
|
+
|
|
|
currentVideo.value = {
|
|
|
url: data.url,
|
|
|
kjId: data.kjId
|
|
|
- };
|
|
|
+ };
|
|
|
setTimeout(() => {
|
|
|
if (!videoContext) {
|
|
|
videoContext = uni.createVideoContext(videoId.value, this);
|