|
@@ -2,10 +2,11 @@
|
|
<view class="kecheng-study-page">
|
|
<view class="kecheng-study-page">
|
|
<view class="icon-title-navBar-box">
|
|
<view class="icon-title-navBar-box">
|
|
<view @click="goUpPage" class="nav-bar-icon"></view>
|
|
<view @click="goUpPage" class="nav-bar-icon"></view>
|
|
- <text class="nav-bar-title">{{title}}</text>
|
|
|
|
|
|
+ <text class="nav-bar-title">{{name}}</text>
|
|
</view>
|
|
</view>
|
|
<!-- 播放器 -->
|
|
<!-- 播放器 -->
|
|
- <videoPlayVue ref="videoRef" class="phone-video-box"></videoPlayVue>
|
|
|
|
|
|
+ <videoPlayVue ref="videoRef" class="phone-video-box" v-if="kechengFlag"></videoPlayVue>
|
|
|
|
+ <view v-else class="phone-video-box" style="background-color: #333;"></view>
|
|
<!-- 中间区域 -->
|
|
<!-- 中间区域 -->
|
|
<view class="kc-info-box">
|
|
<view class="kc-info-box">
|
|
<view>时长:{{period}}分钟</view>
|
|
<view>时长:{{period}}分钟</view>
|
|
@@ -18,9 +19,10 @@
|
|
</view>
|
|
</view>
|
|
<view class="kecheng-content-box">
|
|
<view class="kecheng-content-box">
|
|
<!-- 目录 -->
|
|
<!-- 目录 -->
|
|
- <kechengMuluVue v-if="current === 0" :chapterArr="list" @play="handlePlay" :isHasProgress="false" :activeKjId="curPlayData&&curPlayData.kjId"></kechengMuluVue>
|
|
|
|
|
|
+ <kechengMuluVue v-if="current === 0" :chapterArr="list" @play="handlePlay" :isHasProgress="false"
|
|
|
|
+ :activeKjId="curPlayData&&curPlayData.kjId"></kechengMuluVue>
|
|
<!-- 介绍 -->
|
|
<!-- 介绍 -->
|
|
- <rich-text :nodes="intro" v-if="current === 1 && intro" class="kecheng-jieshao-box"></rich-text>
|
|
|
|
|
|
+ <rich-text :nodes="intro || '暂无内容'" v-if="current === 1 && intro" class="kecheng-jieshao-box"></rich-text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -53,7 +55,8 @@
|
|
userCount: 0, // 学习人数
|
|
userCount: 0, // 学习人数
|
|
list: [],
|
|
list: [],
|
|
intro: '',
|
|
intro: '',
|
|
- curPlayData: null
|
|
|
|
|
|
+ curPlayData: null,
|
|
|
|
+ kechengFlag: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
@@ -81,6 +84,14 @@
|
|
return data;
|
|
return data;
|
|
},
|
|
},
|
|
handlePlay(data) {
|
|
handlePlay(data) {
|
|
|
|
+ if (!this.kechengFlag) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '当前课件不可查看'
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (this.curPlayData && this.curPlayData.videoId == data.videoId) {
|
|
if (this.curPlayData && this.curPlayData.videoId == data.videoId) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -92,6 +103,7 @@
|
|
videoId: data.url,
|
|
videoId: data.url,
|
|
playAuth: res.data,
|
|
playAuth: res.data,
|
|
seekTime: '',
|
|
seekTime: '',
|
|
|
|
+ isPlay: true
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -102,7 +114,9 @@
|
|
this.list[0].jieList[0].open = true;
|
|
this.list[0].jieList[0].open = true;
|
|
|
|
|
|
const kejian = this.list[0].jieList[0].kejianList[0];
|
|
const kejian = this.list[0].jieList[0].kejianList[0];
|
|
- this.handlePlay(kejian)
|
|
|
|
|
|
+ if (this.kechengFlag == 1) {
|
|
|
|
+ this.handlePlay(kejian)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
init() {
|
|
init() {
|
|
@@ -114,11 +128,13 @@
|
|
period,
|
|
period,
|
|
name,
|
|
name,
|
|
kejianUserVo,
|
|
kejianUserVo,
|
|
- intro
|
|
|
|
|
|
+ intro,
|
|
|
|
+ kechengFlag
|
|
} = res.data;
|
|
} = res.data;
|
|
this.userCount = userCount;
|
|
this.userCount = userCount;
|
|
this.period = formatDuration(period);
|
|
this.period = formatDuration(period);
|
|
this.name = name;
|
|
this.name = name;
|
|
|
|
+ this.kechengFlag = kechengFlag;
|
|
let testData = JSON.parse(JSON.stringify([...kejianUserVo.zhangList, ...kejianUserVo.zhangList,
|
|
let testData = JSON.parse(JSON.stringify([...kejianUserVo.zhangList, ...kejianUserVo.zhangList,
|
|
...kejianUserVo.zhangList
|
|
...kejianUserVo.zhangList
|
|
]))
|
|
]))
|
|
@@ -126,6 +142,7 @@
|
|
this.list = testData;
|
|
this.list = testData;
|
|
this.intro = intro;
|
|
this.intro = intro;
|
|
|
|
|
|
|
|
+
|
|
this.initFirstVideo();
|
|
this.initFirstVideo();
|
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
uni.setNavigationBarTitle({
|