From 08b39a5bb1b634c727c8498a0cc599d328c33603 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Tue, 29 Dec 2020 18:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4Play=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=9A=84=E6=92=AD=E6=94=BE=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 9ffb74c..f616a21 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -123,7 +123,7 @@ 上次播放到:【{{right.history[0].site}}】{{right.history[0].name}} 第{{right.history[0].index+1}}集 - {{fmtMSS(right.history[0].time.toFixed(0))}}/{{fmtMSS(right.history[0].duration.toFixed(0))}} + {{fmtMSS(right.history[0].time.toFixed(0))}}/{{fmtMSS(right.history[0].duration.toFixed(0))}}
@@ -684,9 +684,11 @@ export default { async videoPlaying () { this.changeVideo() const db = await history.find({ site: this.video.key, ids: this.video.info.id }) - let time + let time = this.xg.currentTime || 0 + let duration = this.xg.duration || 0 if (db) { - time = db.time || '' + time = time || db.time + duration = duration || db.duration await history.remove(db.id) } const doc = { @@ -697,6 +699,7 @@ export default { year: this.video.info.year, index: this.video.info.index, time: time, + duration: duration, detail: this.video.detail } await history.add(doc)