|
@@ -4,51 +4,25 @@
|
|
|
<view @click="goUpPage" class="nav-bar-icon"></view>
|
|
<view @click="goUpPage" class="nav-bar-icon"></view>
|
|
|
<text class="nav-bar-title">{{jieInfo.jieIntro}}</text>
|
|
<text class="nav-bar-title">{{jieInfo.jieIntro}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="ezy-page-body ksp-page-body">
|
|
|
|
|
- <view class="ksp-tab-box">
|
|
|
|
|
- <ezyActiveVue class="ezy-tab-item-active tab-item" :class="{active: showA}"
|
|
|
|
|
- @click="handleSelectHexinti">核心基础题</ezyActiveVue>
|
|
|
|
|
- <ezyActiveVue class="ezy-tab-item-active tab-item" :class="{active: showB}"
|
|
|
|
|
- @click="handleSelectNengliTishengti">能力提升题</ezyActiveVue>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="ezy-page-body jstx-ksp-page-body">
|
|
|
<!-- 核心基础题 -->
|
|
<!-- 核心基础题 -->
|
|
|
- <videoPlayVue ref="c1" v-show="showA" :key="1" :videoId1="videoId" :progressMarkers1="progressMarkers"
|
|
|
|
|
|
|
+ <videoPlayVue ref="c1" :key="1" :videoId1="videoId" :progressMarkers1="progressMarkers"
|
|
|
:playAuth1="playAuth" :hideFlag1="hideFlag" :seek-time1="seekTime" class="ksp-video-box"
|
|
:playAuth1="playAuth" :hideFlag1="hideFlag" :seek-time1="seekTime" class="ksp-video-box"
|
|
|
@playEnd="playEnd"></videoPlayVue>
|
|
@playEnd="playEnd"></videoPlayVue>
|
|
|
- <videoPlayVue2 ref="c2" v-show="videoId2 && showB" :key="2" :videoId1="videoId2"
|
|
|
|
|
- :progressMarkers1="progressMarkers2" :playAuth1="playAuth2" :hideFlag1="hideFlag2"
|
|
|
|
|
- :seek-time1="seekTime2" class="ksp-video-box" @playEnd="playEnd2"></videoPlayVue2>
|
|
|
|
|
<view class="ksp-scroll-view">
|
|
<view class="ksp-scroll-view">
|
|
|
- <view class="ksp-item-list" v-for="(item,index) in jieInfo.jiedianList1" :key="index" v-show="showA">
|
|
|
|
|
|
|
+ <view class="ksp-item-list" v-for="(item,index) in jieInfo.jiedianList1" :key="index">
|
|
|
<view class="list-head">
|
|
<view class="list-head">
|
|
|
<view class="list-title">{{item.name}}</view>
|
|
<view class="list-title">{{item.name}}</view>
|
|
|
- <ezyActiveVue class="ezy-btn-active list-btn" @click="markersClick(item)"></ezyActiveVue>
|
|
|
|
|
|
|
+<!-- <ezyActiveVue class="ezy-btn-active list-btn" @click="markersClick(item)"></ezyActiveVue>-->
|
|
|
</view>
|
|
</view>
|
|
|
<view class="list-body">
|
|
<view class="list-body">
|
|
|
- <!-- <view class="ksp-title">课程位置:{{item.time1}}-{{item.time2}}</view> -->
|
|
|
|
|
<rich-text :nodes="item.title"></rich-text>
|
|
<rich-text :nodes="item.title"></rich-text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <!-- 能力提升题 -->
|
|
|
|
|
- <template v-if="!!videoId2">
|
|
|
|
|
- <view class="ksp-item-list" v-for="(item,index) in jieInfo.jiedianList2" :key="index"
|
|
|
|
|
- v-show="showB">
|
|
|
|
|
- <view class="list-head">
|
|
|
|
|
- <view class="list-title">{{item.name}}</view>
|
|
|
|
|
- <ezyActiveVue class="ezy-btn-active list-btn" @click="markersClick2(item)"></ezyActiveVue>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="list-body">
|
|
|
|
|
- <!-- <view class="ksp-title">课程位置:{{item.time1}}-{{item.time2}}</view> -->
|
|
|
|
|
- <rich-text :nodes="item.title"></rich-text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 无数据 -->
|
|
<!-- 无数据 -->
|
|
|
- <template v-if="!videoId2 && showB">
|
|
|
|
|
- <view class="ezy-no-sj" v-if="showB">
|
|
|
|
|
|
|
+ <template v-if="!videoId">
|
|
|
|
|
+ <view class="ezy-no-sj">
|
|
|
<icon></icon>
|
|
<icon></icon>
|
|
|
<text>暂无数据</text>
|
|
<text>暂无数据</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -81,7 +55,6 @@
|
|
|
import * as httpApi from "@/api/chanpinZiRanPinDu.js";
|
|
import * as httpApi from "@/api/chanpinZiRanPinDu.js";
|
|
|
import tishiDlVue from './components/tishiDl.vue';
|
|
import tishiDlVue from './components/tishiDl.vue';
|
|
|
import videoPlayVue from './components/videoPlay.vue';
|
|
import videoPlayVue from './components/videoPlay.vue';
|
|
|
- import videoPlayVue2 from './components/videoPlay2.vue';
|
|
|
|
|
import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
|
|
import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -109,21 +82,11 @@
|
|
|
hideFlag: 'show',
|
|
hideFlag: 'show',
|
|
|
videoId: "", //阿里云视频id
|
|
videoId: "", //阿里云视频id
|
|
|
seekTime: '',
|
|
seekTime: '',
|
|
|
- showA: true,
|
|
|
|
|
-
|
|
|
|
|
- pageData2: null, //上个页面获取的视频参数(视频id)
|
|
|
|
|
- playAuth2: "", //播放凭证
|
|
|
|
|
- progressMarkers2: [],
|
|
|
|
|
- hideFlag2: 'show',
|
|
|
|
|
- videoId2: "", //阿里云视频id
|
|
|
|
|
- seekTime2: '',
|
|
|
|
|
- showB: false,
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
|
tishiDlVue,
|
|
tishiDlVue,
|
|
|
videoPlayVue,
|
|
videoPlayVue,
|
|
|
- videoPlayVue2,
|
|
|
|
|
ezyActiveVue
|
|
ezyActiveVue
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
@@ -131,27 +94,11 @@
|
|
|
},
|
|
},
|
|
|
onHide() {
|
|
onHide() {
|
|
|
this.hideFlag = 'hide'
|
|
this.hideFlag = 'hide'
|
|
|
- this.hideFlag2 = 'hide'
|
|
|
|
|
},
|
|
},
|
|
|
onUnload() {
|
|
onUnload() {
|
|
|
this.hideFlag = 'hide'
|
|
this.hideFlag = 'hide'
|
|
|
- this.hideFlag2 = 'hide'
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- handleSelectHexinti() {
|
|
|
|
|
- if (this.showA) return;
|
|
|
|
|
- this.showB = false;
|
|
|
|
|
- this.showA = true;
|
|
|
|
|
- this.$refs.c1 && this.$refs.c1.handleStop()
|
|
|
|
|
- this.$refs.c2 && this.$refs.c2.handleStop()
|
|
|
|
|
- },
|
|
|
|
|
- handleSelectNengliTishengti() {
|
|
|
|
|
- if (this.showB) return;
|
|
|
|
|
- this.showB = true;
|
|
|
|
|
- this.showA = false;
|
|
|
|
|
- this.$refs.c1 && this.$refs.c1.handleStop()
|
|
|
|
|
- this.$refs.c2 && this.$refs.c2.handleStop()
|
|
|
|
|
- },
|
|
|
|
|
// 当前节学习完成
|
|
// 当前节学习完成
|
|
|
saveJieWancheng() {
|
|
saveJieWancheng() {
|
|
|
httpApi.getPinduChanpinWancheng({
|
|
httpApi.getPinduChanpinWancheng({
|
|
@@ -159,7 +106,7 @@
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
// 更新单员状态
|
|
// 更新单员状态
|
|
|
- cacheManager.updateShuxueWanchengStatus(this.jieInfo.jieId)
|
|
|
|
|
|
|
+ cacheManager.updateJisuanWanchengStatus(this.jieInfo.jieId)
|
|
|
// 学习完成提示弹窗
|
|
// 学习完成提示弹窗
|
|
|
this.$refs.popupRef.open();
|
|
this.$refs.popupRef.open();
|
|
|
}
|
|
}
|
|
@@ -183,21 +130,16 @@
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
// 时间节点转换
|
|
// 时间节点转换
|
|
|
res.data.jiedianList1.forEach(item => item.offset = convertTimeToSeconds(item.time1))
|
|
res.data.jiedianList1.forEach(item => item.offset = convertTimeToSeconds(item.time1))
|
|
|
- res.data.jiedianList2.forEach(item => item.offset = convertTimeToSeconds(item.time1))
|
|
|
|
|
// 重新赋值
|
|
// 重新赋值
|
|
|
Object.assign(this.jieInfo, res.data)
|
|
Object.assign(this.jieInfo, res.data)
|
|
|
// 触发当前节学习进度
|
|
// 触发当前节学习进度
|
|
|
// this.saveJinduStart();
|
|
// this.saveJinduStart();
|
|
|
// 针对视频进行赋值
|
|
// 针对视频进行赋值
|
|
|
this.videoId = this.jieInfo.video1;
|
|
this.videoId = this.jieInfo.video1;
|
|
|
- this.videoId2 = this.jieInfo.video2;
|
|
|
|
|
// 针对节点赋值
|
|
// 针对节点赋值
|
|
|
this.progressMarkers = this.jieInfo.jiedianList1;
|
|
this.progressMarkers = this.jieInfo.jiedianList1;
|
|
|
- this.progressMarkers = this.jieInfo.jiedianList2;
|
|
|
|
|
// 执行方法
|
|
// 执行方法
|
|
|
this.getLive(); //获取播放凭证
|
|
this.getLive(); //获取播放凭证
|
|
|
-
|
|
|
|
|
- this.getLive2();
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
init(options) {
|
|
init(options) {
|
|
@@ -210,11 +152,6 @@
|
|
|
// #endif
|
|
// #endif
|
|
|
this.saveJieWancheng();
|
|
this.saveJieWancheng();
|
|
|
},
|
|
},
|
|
|
- playEnd2(data) {
|
|
|
|
|
- // #ifdef APP-PLUS
|
|
|
|
|
- plus.screen.lockOrientation('portrait-primary');
|
|
|
|
|
- // #endif
|
|
|
|
|
- },
|
|
|
|
|
getLive() {
|
|
getLive() {
|
|
|
if (!this.videoId) {
|
|
if (!this.videoId) {
|
|
|
toast("video缺失!")
|
|
toast("video缺失!")
|
|
@@ -228,45 +165,16 @@
|
|
|
this.playAuth = res.data
|
|
this.playAuth = res.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getLive2() {
|
|
|
|
|
- if (!this.videoId2) {
|
|
|
|
|
- // toast("video缺失!")
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- let req = {
|
|
|
|
|
- videoId: this.videoId2
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- getVideoAuth(req).then(res => {
|
|
|
|
|
- this.playAuth2 = res.data
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
markersClick(data) {
|
|
markersClick(data) {
|
|
|
- this.showA = true;
|
|
|
|
|
- this.showB = false;
|
|
|
|
|
- this.$refs.c2 && this.$refs.c2.handleStop();
|
|
|
|
|
this.seekTime = ""
|
|
this.seekTime = ""
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.seekTime = data.offset
|
|
this.seekTime = data.offset
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- markersClick2(data) {
|
|
|
|
|
- this.showA = false;
|
|
|
|
|
- this.showB = true;
|
|
|
|
|
- this.$refs.c1 && this.$refs.c1.handleStop()
|
|
|
|
|
- this.seekTime2 = ""
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.seekTime2 = data.offset
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
goUpPage() {
|
|
goUpPage() {
|
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
|
url: "/pages/chanpinneirong/index"
|
|
url: "/pages/chanpinneirong/index"
|
|
|
})
|
|
})
|
|
|
- // uni.navigateBack()
|
|
|
|
|
- // uni.redirectTo({
|
|
|
|
|
- // url: "/pages/chanpinneirong/index"
|
|
|
|
|
- // })
|
|
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|