|
@@ -8,7 +8,9 @@
|
|
|
<videoPlayVue v-if="showVideo" ref="videoRef" class="phone-video-box" @play-end="onPlayEnd" @play-play="onPlay"
|
|
|
@play-pause="onPause" @play-timeupdate="onTimeupdate"></videoPlayVue>
|
|
|
<!-- 视频背景图 -->
|
|
|
- <view v-else class="phone-video-box master-image"></view>
|
|
|
+ <view v-else class="phone-video-box master-image">
|
|
|
+ <view class="bifaibg-icon" @click="handlePlayFirst"></view>
|
|
|
+ </view>
|
|
|
<!-- 中间区域 -->
|
|
|
<view class="kc-name-box">
|
|
|
<icon @click="goUpPage"></icon>
|
|
@@ -93,6 +95,44 @@
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handlePlayFirst() {
|
|
|
+ let sectionPage = getKechengSectionPageFromHistory(this.operId)
|
|
|
+ if (sectionPage) {
|
|
|
+ const {
|
|
|
+ zhangIndex,
|
|
|
+ jieIndex
|
|
|
+ } = getCurKjIndex(sectionPage.kjId,this.operId)
|
|
|
+ sectionPage.iChapter = zhangIndex;
|
|
|
+ sectionPage.iSection = jieIndex;
|
|
|
+ sectionPage.kjId = sectionPage.kjId;
|
|
|
+ sectionPage.operId = this.operId;
|
|
|
+
|
|
|
+ // 设置默认展开项
|
|
|
+ this.list[zhangIndex].open = true;
|
|
|
+ this.list[zhangIndex].jieList[jieIndex].open = true;
|
|
|
+
|
|
|
+ const kejian = this.list[0].jieList && this.list[zhangIndex].jieList[jieIndex].kejianList.find(item => item.kjId ==sectionPage.kjId )
|
|
|
+ this.handlePlay(kejian)
|
|
|
+ } else {
|
|
|
+ if (this.list && this.list[0].jieList && this.list[0].jieList[0].kejianList) {
|
|
|
+ // 设置默认展开项
|
|
|
+ this.list[0].open = true;
|
|
|
+ this.list[0].jieList[0].open = true;
|
|
|
+ // 设置播放可见
|
|
|
+ const kejian = this.list[0].jieList[0].kejianList[0];
|
|
|
+ this.handlePlay(kejian)
|
|
|
+ // 更新缓存
|
|
|
+ sectionPage = {
|
|
|
+ kjId: kejian.kjId,
|
|
|
+ iChapter: 0,
|
|
|
+ iSection: 0,
|
|
|
+ operId: this.operId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ saveKechengSectionPage(this.operId, sectionPage)
|
|
|
+ },
|
|
|
onPause() {
|
|
|
clearInterval(this.timer1);
|
|
|
this.timer1 = null;
|