From 096b4d79f58a7e483cab66b09791c5711b366602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Thu, 4 May 2023 16:50:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Ordervideolearning/Ordervideolearning.vue | 14 ++++++++------ pages/Videolearning/Videolearning.vue | 12 +++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pages/Ordervideolearning/Ordervideolearning.vue b/pages/Ordervideolearning/Ordervideolearning.vue index bee26a4..396fd60 100644 --- a/pages/Ordervideolearning/Ordervideolearning.vue +++ b/pages/Ordervideolearning/Ordervideolearning.vue @@ -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 diff --git a/pages/Videolearning/Videolearning.vue b/pages/Videolearning/Videolearning.vue index 5d468d1..35cf92d 100644 --- a/pages/Videolearning/Videolearning.vue +++ b/pages/Videolearning/Videolearning.vue @@ -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