|
@@ -5,8 +5,10 @@
|
|
<text class="nav-bar-title">{{name}}</text>
|
|
<text class="nav-bar-title">{{name}}</text>
|
|
</view> -->
|
|
</view> -->
|
|
<!-- 播放器 -->
|
|
<!-- 播放器 -->
|
|
- <videoPlayVue ref="videoRef" class="phone-video-box" @play-end="onPlayEnd" @play-play="onPlay"
|
|
|
|
|
|
+ <videoPlayVue v-if="showVideo" ref="videoRef" class="phone-video-box" @play-end="onPlayEnd" @play-play="onPlay"
|
|
@play-pause="onPause" @play-timeupdate="onTimeupdate"></videoPlayVue>
|
|
@play-pause="onPause" @play-timeupdate="onTimeupdate"></videoPlayVue>
|
|
|
|
+ <!-- 视频背景图 -->
|
|
|
|
+ <view v-else class="phone-video-box master-image"></view>
|
|
<!-- 中间区域 -->
|
|
<!-- 中间区域 -->
|
|
<view class="kc-name-box">
|
|
<view class="kc-name-box">
|
|
<icon @click="goUpPage"></icon>
|
|
<icon @click="goUpPage"></icon>
|
|
@@ -64,6 +66,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ showVideo: false,
|
|
items: ['目录', '介绍'],
|
|
items: ['目录', '介绍'],
|
|
colors: ['#007aff', '#4cd964', '#dd524d'],
|
|
colors: ['#007aff', '#4cd964', '#dd524d'],
|
|
activeColor: '#3fd2a1',
|
|
activeColor: '#3fd2a1',
|
|
@@ -173,6 +176,7 @@
|
|
return data;
|
|
return data;
|
|
},
|
|
},
|
|
handlePlay(data) {
|
|
handlePlay(data) {
|
|
|
|
+ this.showVideo = true;
|
|
if (this.curPlayData && this.curPlayData.url == data.url) {
|
|
if (this.curPlayData && this.curPlayData.url == data.url) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -188,7 +192,6 @@
|
|
sectionPage.kjId = data.kjId;
|
|
sectionPage.kjId = data.kjId;
|
|
sectionPage.operId = this.operId;
|
|
sectionPage.operId = this.operId;
|
|
saveKechengSectionPage(this.operId, sectionPage)
|
|
saveKechengSectionPage(this.operId, sectionPage)
|
|
-
|
|
|
|
kechengApi.getVideoAuth({
|
|
kechengApi.getVideoAuth({
|
|
videoId: data.url
|
|
videoId: data.url
|
|
}).then(res => {
|
|
}).then(res => {
|
|
@@ -218,7 +221,7 @@
|
|
this.list[zhangIndex].jieList[jieIndex].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 )
|
|
const kejian = this.list[0].jieList && this.list[zhangIndex].jieList[jieIndex].kejianList.find(item => item.kjId ==sectionPage.kjId )
|
|
- this.handlePlay(kejian)
|
|
|
|
|
|
+ // this.handlePlay(kejian)
|
|
} else {
|
|
} else {
|
|
if (this.list && this.list[0].jieList && this.list[0].jieList[0].kejianList) {
|
|
if (this.list && this.list[0].jieList && this.list[0].jieList[0].kejianList) {
|
|
// 设置默认展开项
|
|
// 设置默认展开项
|
|
@@ -226,7 +229,7 @@
|
|
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)
|
|
|
|
|
|
+ // this.handlePlay(kejian)
|
|
// 更新缓存
|
|
// 更新缓存
|
|
sectionPage = {
|
|
sectionPage = {
|
|
kjId: kejian.kjId,
|
|
kjId: kejian.kjId,
|