|
|
@@ -5,41 +5,44 @@
|
|
|
<text class="nav-bar-title">{{jieInfo.jieIntro}}</text>
|
|
|
</view>
|
|
|
<view class="ksp-body">
|
|
|
- <!-- <view class="ezy-video-box course-video-box">
|
|
|
- <view ref="videoContent" id="wgy-player-test" :playAuth="playAuth"
|
|
|
- :change:playAuth="renderScript.receiveMsg" :videoId="videoId" :change:videoId="renderScript.videoIdFun"
|
|
|
- :hideFlag="hideFlag" :change:hideFlag="renderScript.hideFlagFun" :progressMarkers="progressMarkers"
|
|
|
- :change:progressMarkers="renderScript.progressMarkersMsg" :seekTime="seekTime"
|
|
|
- :change:seekTime="renderScript.seekTimeFun" class="ezy-video">
|
|
|
+ <view>
|
|
|
+ <view @click="handleSelectHexinti">核心基础题</view>
|
|
|
+ <view @click="handleSelectNengliTishengti">能力提升题</view>
|
|
|
</view>
|
|
|
- </view> -->
|
|
|
- <videoPlayVue ref="c1" v-show="showA" :key="1" :videoId1="videoId" :progressMarkers1="progressMarkers" :playAuth1="playAuth"
|
|
|
- :hideFlag1="hideFlag" :seek-time1="seekTime" class="ksp-video-box" @playEnd="playEnd"></videoPlayVue>
|
|
|
- <videoPlayVue2 ref="c2" v-show="showB" :key="2" :videoId1="videoId2" :progressMarkers1="progressMarkers2" :playAuth1="playAuth2"
|
|
|
- :hideFlag1="hideFlag2" :seek-time1="seekTime2" class="ksp-video-box" @playEnd="playEnd"
|
|
|
- ></videoPlayVue2>
|
|
|
<!-- 核心基础题 -->
|
|
|
- <view class="ksp-item-list">
|
|
|
+ <videoPlayVue ref="c1" v-show="showA" :key="1" :videoId1="videoId" :progressMarkers1="progressMarkers"
|
|
|
+ :playAuth1="playAuth" :hideFlag1="hideFlag" :seek-time1="seekTime" class="ksp-video-box"
|
|
|
+ @playEnd="playEnd"></videoPlayVue>
|
|
|
+ <view class="ksp-item-list" v-show="showA">
|
|
|
<view class="item-title">核心基础题</view>
|
|
|
- <view class="ksp-item-box" v-for="(item,index) in jieInfo.jiedianList1" :key="index" @click="markersClick(item)">
|
|
|
+ <view class="ksp-item-box" v-for="(item,index) in jieInfo.jiedianList1" :key="index"
|
|
|
+ @click="markersClick(item)">
|
|
|
<icon class="ksp-icon"></icon>
|
|
|
<view>
|
|
|
<view class="ksp-title">{{item.name}}</view>
|
|
|
<view class="ksp-title">课程位置:{{item.time1}}-{{item.time2}}</view>
|
|
|
+ <rich-text :nodes="item.title"></rich-text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 能力提升题 -->
|
|
|
- <view class="ksp-item-list">
|
|
|
- <view class="item-title">能力提升题</view>
|
|
|
- <view class="ksp-item-box" v-for="(item,index) in jieInfo.jiedianList2" :key="index" @click="markersClick2(item)">
|
|
|
- <icon class="ksp-icon"></icon>
|
|
|
- <view>
|
|
|
- <view class="ksp-title">{{item.name}}</view>
|
|
|
- <view class="ksp-title">课程位置:{{item.time1}}-{{item.time2}}</view>
|
|
|
+ <template v-if="!!videoId2">
|
|
|
+ <videoPlayVue2 ref="c2" v-show="showB" :key="2" :videoId1="videoId2"
|
|
|
+ :progressMarkers1="progressMarkers2" :playAuth1="playAuth2" :hideFlag1="hideFlag2"
|
|
|
+ :seek-time1="seekTime2" class="ksp-video-box" @playEnd="playEnd"></videoPlayVue2>
|
|
|
+ <view class="ksp-item-list" v-show="showB">
|
|
|
+ <view class="item-title">能力提升题</view>
|
|
|
+ <view class="ksp-item-box" v-for="(item,index) in jieInfo.jiedianList2" :key="index"
|
|
|
+ @click="markersClick2(item)">
|
|
|
+ <icon class="ksp-icon"></icon>
|
|
|
+ <view>
|
|
|
+ <view class="ksp-title">{{item.name}}</view>
|
|
|
+ <view class="ksp-title">课程位置:{{item.time1}}-{{item.time2}}</view>
|
|
|
+ <rich-text :nodes="item.title"></rich-text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
<!-- 弹窗 -->
|
|
|
<tishiDlVue ref="popupRef"></tishiDlVue>
|
|
|
@@ -61,7 +64,8 @@
|
|
|
videoWancheng
|
|
|
} from "@/api/shipin.js"
|
|
|
import {
|
|
|
- toast,convertTimeToSeconds
|
|
|
+ toast,
|
|
|
+ convertTimeToSeconds
|
|
|
} from "@/utils/common";
|
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
|
import * as httpApi from "@/api/chanpinShuxue.js";
|
|
|
@@ -107,7 +111,9 @@
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- tishiDlVue,videoPlayVue,videoPlayVue2
|
|
|
+ tishiDlVue,
|
|
|
+ videoPlayVue,
|
|
|
+ videoPlayVue2
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.init(options)
|
|
|
@@ -121,9 +127,25 @@
|
|
|
this.hideFlag2 = 'hide'
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSelectHexinti() {
|
|
|
+ if (this.showA) return;
|
|
|
+ this.showB = false;
|
|
|
+ this.showA = true;
|
|
|
+ this.$refs.c1.handleStop()
|
|
|
+ this.$refs.c2.handleStop()
|
|
|
+ },
|
|
|
+ handleSelectNengliTishengti() {
|
|
|
+ if (this.showB) return;
|
|
|
+ this.showB = true;
|
|
|
+ this.showA = false;
|
|
|
+ this.$refs.c1.handleStop()
|
|
|
+ this.$refs.c2.handleStop()
|
|
|
+ },
|
|
|
// 当前节学习完成
|
|
|
saveJieWancheng() {
|
|
|
- httpApi.getShuxueChanpinWancheng({jieId: this.jieInfo.jieId}).then(res => {
|
|
|
+ httpApi.getShuxueChanpinWancheng({
|
|
|
+ jieId: this.jieInfo.jieId
|
|
|
+ }).then(res => {
|
|
|
if (res.data) {
|
|
|
// 更新单员状态
|
|
|
cacheManager.updateStatusAndProess(this.jieInfo.jieId)
|
|
|
@@ -134,7 +156,9 @@
|
|
|
},
|
|
|
// 当前节学习开始
|
|
|
saveJinduStart() {
|
|
|
- httpApi.getShuxueChanpinSave({jieId: this.jieInfo.jieId})
|
|
|
+ httpApi.getShuxueChanpinSave({
|
|
|
+ jieId: this.jieInfo.jieId
|
|
|
+ })
|
|
|
},
|
|
|
courseBjFun() {
|
|
|
return 'static/images/course/couse-shuxue-bj.png'
|
|
|
@@ -152,16 +176,16 @@
|
|
|
// 重新赋值
|
|
|
Object.assign(this.jieInfo, res.data)
|
|
|
// 触发当前节学习进度
|
|
|
- // this.saveJinduStart();
|
|
|
+ this.saveJinduStart();
|
|
|
// 针对视频进行赋值
|
|
|
this.videoId = this.jieInfo.video1;
|
|
|
this.videoId2 = this.jieInfo.video2;
|
|
|
// 针对节点赋值
|
|
|
- this.progressMarkers = this.jieInfo.jiedianList1;
|
|
|
- this.progressMarkers = this.jieInfo.jiedianList2;
|
|
|
+ this.progressMarkers = this.jieInfo.jiedianList1;
|
|
|
+ this.progressMarkers = this.jieInfo.jiedianList2;
|
|
|
// 执行方法
|
|
|
this.getLive(); //获取播放凭证
|
|
|
-
|
|
|
+
|
|
|
this.getLive2();
|
|
|
})
|
|
|
},
|
|
|
@@ -183,7 +207,7 @@
|
|
|
let req = {
|
|
|
videoId: this.videoId
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
getVideoAuth(req).then(res => {
|
|
|
this.playAuth = res.data
|
|
|
})
|
|
|
@@ -196,7 +220,7 @@
|
|
|
let req = {
|
|
|
videoId: this.videoId2
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
getVideoAuth(req).then(res => {
|
|
|
this.playAuth2 = res.data
|
|
|
})
|
|
|
@@ -227,7 +251,4 @@
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
-</script>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+</script>
|