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

View File

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