课程介绍页面调整
This commit is contained in:
@@ -56,9 +56,10 @@
|
||||
|
||||
// importScripts('@/static/aliplayer/aliplayer-min.js')
|
||||
export default {
|
||||
props: ["currentVideo", "currentVideoList"],
|
||||
props: ["currentVideo", "currentVideoList",'noRecored'],
|
||||
data() {
|
||||
return {
|
||||
// noRecored 为true时候不记录播放时长
|
||||
//当前是否是全屏模式
|
||||
isFullScreen: false,
|
||||
isfresh: false,
|
||||
@@ -75,6 +76,7 @@
|
||||
isSetFirstTime: false,
|
||||
screenType: null,
|
||||
videoUrl: null,
|
||||
num:0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -98,7 +100,9 @@
|
||||
// plus.screen.lockOrientation("portrait-primary");
|
||||
// #endif
|
||||
this.timer = null;
|
||||
await this.setVideoTime();
|
||||
|
||||
await this.setVideoTime();
|
||||
|
||||
this.player.dispose();
|
||||
},
|
||||
|
||||
@@ -130,8 +134,8 @@
|
||||
this.timer = setInterval(() => {
|
||||
var that = this;
|
||||
if (this.currentTime) {
|
||||
that.setVideoTime();
|
||||
console.log('我是onload定义的定时');
|
||||
|
||||
that.setVideoTime();
|
||||
}
|
||||
}, 60000);
|
||||
|
||||
@@ -189,12 +193,12 @@
|
||||
var that = this;
|
||||
if (this.currentTime) {
|
||||
console.log('我是init定义的定时');
|
||||
await that.setVideoTime();
|
||||
await that.setVideoTime();
|
||||
}
|
||||
}, 60000);
|
||||
await this.getLive();
|
||||
},
|
||||
async getData(data) {
|
||||
async getData(data) {
|
||||
if (!this.isSetFirstTime) {
|
||||
var netWork = this.videoData.userCourseVideoPositionEntity ?
|
||||
this.videoData.userCourseVideoPositionEntity.position :
|
||||
@@ -218,8 +222,8 @@
|
||||
}
|
||||
}
|
||||
this.currentTime = this.firstTime;
|
||||
console.log(this.firstTime, "这是第一次播放时长222");
|
||||
await this.setVideoTime();
|
||||
console.log(this.firstTime, "这是第一次播放时长222",this.noRecored);
|
||||
await this.setVideoTime();
|
||||
uni.setStorageSync("videoOssList", JSON.stringify(list));
|
||||
|
||||
if (this.currentVideo.type == 0 || this.currentVideo.type == 2) {
|
||||
@@ -309,10 +313,15 @@
|
||||
var data = list.find((e) => e.id == this.videoData.id);
|
||||
this.currentTime = data.time;
|
||||
console.log('this.currentTime at line 这是结束的时候掉的存储视频:', this.currentTime)
|
||||
await this.setVideoTime();
|
||||
await this.setVideoTime();
|
||||
this.timer = null;
|
||||
},
|
||||
setVideoTime(time) {
|
||||
let thisBlur = JSON.parse(this.noRecored)
|
||||
if(thisBlur){
|
||||
console.log('本条视频不记录播放记录,是未购买且试听章节',thisBlur);
|
||||
return
|
||||
}
|
||||
console.log("是否走了存储视屏," + this.videoData.id, this.currentTime, );
|
||||
var data = {
|
||||
videoId: this.videoData.id,
|
||||
@@ -767,8 +776,10 @@
|
||||
async receiveIsfresh(newValue) {
|
||||
if (newValue) {
|
||||
if (this.player) {
|
||||
this.timer = null;
|
||||
await this.setVideoTime();
|
||||
this.timer = null;
|
||||
|
||||
await this.setVideoTime();
|
||||
|
||||
this.player.dispose();
|
||||
// this.player.seek(newValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user