This commit is contained in:
曹辉 2023-05-04 16:50:12 +08:00
parent 7e9989cc15
commit 096b4d79f5
2 changed files with 15 additions and 11 deletions

View File

@ -143,7 +143,9 @@
videoended(e) {
this.videoContext.stop()
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.videoitem.videoshow = false
@ -213,12 +215,12 @@
this.videoshow = false
this.videoContext.stop()
if (this.videoerroshow) {
if (this.videoitem.watchTime) {
if (this.videoitem.watchTime == 0) {
this.videoitem.watchTime = '00:00:00'
} else {
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
}
insertTrainingItemWatchRecord(this.videoitem).then(res => {
this.videoitem.watchTime = 0
})
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
}
}
uni.showLoading({
@ -229,7 +231,7 @@
this.videoerroshow = true
if (item.itemDirectoryUrl) {
if (!item.watchTime) {
this.videoitem.watchTime = 0
item.watchTime = 0
}
this.list.trainingOrderItemDirectoryVOList.forEach(e => {
e.videoshow = false

View File

@ -201,10 +201,12 @@
this.videoshow = false
this.videoContext.stop()
if (this.videoerroshow) {
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
insertTrainingItemWatchRecord(this.videoitem).then(res => {
this.videoitem.watchTime = 0
})
if (this.videoitem.watchTime == 0) {
this.videoitem.watchTime = '00:00:00'
} else {
this.videoitem.watchTime = this.formatSeconds(this.videoitem.watchTime)
}
insertTrainingItemWatchRecord(this.videoitem).then(res => {})
}
}
uni.showLoading({
@ -215,7 +217,7 @@
this.videoerroshow = true
if (item.itemDirectoryUrl) {
if (!item.watchTime) {
this.videoitem.watchTime = 0
item.watchTime = 0
}
this.list.trainingItemDirectoryList.forEach(e => {
e.videoshow = false