记录上次播放视频
This commit is contained in:
@@ -3,11 +3,7 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<template v-show="!screenLoading">
|
||||
<z-nav-bar
|
||||
bgColor="#333"
|
||||
fontColor="#fff"
|
||||
title="教学内容"
|
||||
></z-nav-bar>
|
||||
<z-nav-bar bgColor="#333" fontColor="#fff" title="教学内容"></z-nav-bar>
|
||||
|
||||
<view
|
||||
class="contentBox curriculum_box"
|
||||
@@ -49,11 +45,13 @@
|
||||
>视频教学</view
|
||||
>
|
||||
<view class="scroll-view-item">
|
||||
<view style="padding: 20rpx; font-size: 26rpx;">
|
||||
课程:{{options.navTitle}}
|
||||
</view>
|
||||
<view style="padding: 20rpx; margin-bottom: 40rpx; font-size: 26rpx;">
|
||||
章节:{{ curriculumData.title }}
|
||||
<view style="padding: 20rpx; font-size: 26rpx">
|
||||
课程:{{ options.navTitle }}
|
||||
</view>
|
||||
<view
|
||||
style="padding: 20rpx; margin-bottom: 40rpx; font-size: 26rpx"
|
||||
>
|
||||
章节:{{ curriculumData.title }}
|
||||
</view>
|
||||
<common-curriculum-video
|
||||
v-if="videoArray && videoArray.length > 0"
|
||||
@@ -421,9 +419,21 @@ export default {
|
||||
},
|
||||
changeVideo(data) {
|
||||
console.log("data at line 370:", data);
|
||||
this.currentVideo = data;
|
||||
this.initVideo();
|
||||
this.isOpenMp3 = false;
|
||||
if (data.id != this.currentVideo.id) {
|
||||
// handleEnd
|
||||
this.$refs.commonVideo.setVideoTime();
|
||||
|
||||
setTimeout(() => {
|
||||
this.currentVideo = data;
|
||||
this.initVideo();
|
||||
this.isOpenMp3 = false;
|
||||
}, 500);
|
||||
} else {
|
||||
this.currentVideo = data;
|
||||
this.initVideo();
|
||||
this.isOpenMp3 = false;
|
||||
}
|
||||
|
||||
console.log("data at line 380111111111111111111:", data.type);
|
||||
|
||||
// var mynavData = JSON.stringify(data); // 这里转换成 字符串
|
||||
@@ -517,6 +527,19 @@ export default {
|
||||
.then(async (res) => {
|
||||
that.curriculumData = res.data.detail;
|
||||
that.videoArray = res.data.videos;
|
||||
console.log(
|
||||
"that.videoArray at line 这是关联的视频519:",
|
||||
res.data.current
|
||||
);
|
||||
var isHaveHistorySeekVideo = that.videoArray.findIndex(
|
||||
(e) => e.id == res.data.current
|
||||
);
|
||||
console.log(
|
||||
"isHaveHistorySeekVideo at line 522:",
|
||||
isHaveHistorySeekVideo
|
||||
);
|
||||
that.currentCateIndex =
|
||||
isHaveHistorySeekVideo != -1 ? isHaveHistorySeekVideo : 0;
|
||||
if (that.videoArray.length > 0) {
|
||||
this.currentVideo = that.videoArray[that.currentCateIndex];
|
||||
this.initVideo();
|
||||
|
||||
Reference in New Issue
Block a user