This commit is contained in:
曹辉 2023-04-26 16:46:55 +08:00
parent 74af2adae7
commit 58b3b2392c
2 changed files with 25 additions and 15 deletions

View File

@ -78,7 +78,8 @@
videoitem: {
watchTime: 0,
}, //
trainingOrderStatus: undefined
trainingOrderStatus: undefined,
videoerroshow: true,
};
},
methods: {
@ -89,14 +90,16 @@
},
//
videoshowfalse() {
if (this.videoitem.watchTime) {
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
if (this.videoerroshow) {
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) {
@ -105,6 +108,7 @@
type: 'error',
duration: '2000'
})
this.videoerroshow = false
setTimeout(e => {
this.videoshow = false
}, 1000)
@ -119,6 +123,7 @@
},
//
videoplay(item) {
this.videoerroshow = true
if (item.itemDirectoryUrl) {
if (!item.watchTime) {
this.videoitem.watchTime = 0

View File

@ -77,6 +77,7 @@
videoitem: {
watchTime: 0,
}, //
videoerroshow: true,
};
},
methods: {
@ -87,14 +88,16 @@
},
//
videoshowfalse() {
if (this.videoitem.watchTime) {
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
if (this.videoerroshow) {
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) {
@ -103,12 +106,14 @@
type: 'error',
duration: '2000'
})
this.videoerroshow = false
setTimeout(e => {
this.videoshow = false
}, 1000)
},
//
videoplay(item) {
this.videoerroshow = true
if (item.itemDirectoryUrl) {
if (!item.watchTime) {
this.videoitem.watchTime = 0