修改
This commit is contained in:
parent
74af2adae7
commit
58b3b2392c
@ -78,7 +78,8 @@
|
|||||||
videoitem: {
|
videoitem: {
|
||||||
watchTime: 0,
|
watchTime: 0,
|
||||||
}, //视频对象
|
}, //视频对象
|
||||||
trainingOrderStatus: undefined
|
trainingOrderStatus: undefined,
|
||||||
|
videoerroshow: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -89,14 +90,16 @@
|
|||||||
},
|
},
|
||||||
//关闭播放弹出框
|
//关闭播放弹出框
|
||||||
videoshowfalse() {
|
videoshowfalse() {
|
||||||
if (this.videoitem.watchTime) {
|
if (this.videoerroshow) {
|
||||||
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
if (this.videoitem.watchTime) {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
||||||
|
this.videoitem.watchTime = 0
|
||||||
|
this.info();
|
||||||
|
this.videoshow = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
|
||||||
this.videoitem.watchTime = 0
|
|
||||||
this.info();
|
|
||||||
this.videoshow = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//视频播放出错
|
//视频播放出错
|
||||||
videoerror(e) {
|
videoerror(e) {
|
||||||
@ -105,6 +108,7 @@
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
duration: '2000'
|
duration: '2000'
|
||||||
})
|
})
|
||||||
|
this.videoerroshow = false
|
||||||
setTimeout(e => {
|
setTimeout(e => {
|
||||||
this.videoshow = false
|
this.videoshow = false
|
||||||
}, 1000)
|
}, 1000)
|
||||||
@ -119,6 +123,7 @@
|
|||||||
},
|
},
|
||||||
//视频播放
|
//视频播放
|
||||||
videoplay(item) {
|
videoplay(item) {
|
||||||
|
this.videoerroshow = true
|
||||||
if (item.itemDirectoryUrl) {
|
if (item.itemDirectoryUrl) {
|
||||||
if (!item.watchTime) {
|
if (!item.watchTime) {
|
||||||
this.videoitem.watchTime = 0
|
this.videoitem.watchTime = 0
|
||||||
|
|||||||
@ -77,6 +77,7 @@
|
|||||||
videoitem: {
|
videoitem: {
|
||||||
watchTime: 0,
|
watchTime: 0,
|
||||||
}, //视频对象
|
}, //视频对象
|
||||||
|
videoerroshow: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -87,14 +88,16 @@
|
|||||||
},
|
},
|
||||||
//关闭播放弹出框
|
//关闭播放弹出框
|
||||||
videoshowfalse() {
|
videoshowfalse() {
|
||||||
if (this.videoitem.watchTime) {
|
if (this.videoerroshow) {
|
||||||
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
if (this.videoitem.watchTime) {
|
||||||
|
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
|
||||||
|
}
|
||||||
|
insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
||||||
|
this.videoitem.watchTime = 0
|
||||||
|
this.info();
|
||||||
|
this.videoshow = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
insertTrainingItemWatchRecord(this.videoitem).then(res => {
|
|
||||||
this.videoitem.watchTime = 0
|
|
||||||
this.info();
|
|
||||||
this.videoshow = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//视频播放出错
|
//视频播放出错
|
||||||
videoerror(e) {
|
videoerror(e) {
|
||||||
@ -103,12 +106,14 @@
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
duration: '2000'
|
duration: '2000'
|
||||||
})
|
})
|
||||||
|
this.videoerroshow = false
|
||||||
setTimeout(e => {
|
setTimeout(e => {
|
||||||
this.videoshow = false
|
this.videoshow = false
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
//视频播放
|
//视频播放
|
||||||
videoplay(item) {
|
videoplay(item) {
|
||||||
|
this.videoerroshow = true
|
||||||
if (item.itemDirectoryUrl) {
|
if (item.itemDirectoryUrl) {
|
||||||
if (!item.watchTime) {
|
if (!item.watchTime) {
|
||||||
this.videoitem.watchTime = 0
|
this.videoitem.watchTime = 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user