From 59d33d201c30c0107b0d8095bb65d798769eeb6d Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Wed, 4 Nov 2020 09:43:20 +0100 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=97=B6=E9=97=B4=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E5=B7=B2=E7=BB=8F=E8=AE=BE=E5=AE=9A,=E6=97=A0?= =?UTF-8?q?=E9=9C=80=E8=AF=BB=E5=8F=96=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 5dc014f..8425b2e 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -340,15 +340,16 @@ export default { this.getIptvList() } else { const index = this.video.info.index | 0 - let historyTime = 0 - const db = await history.find({ site: this.video.key, ids: this.video.info.id }) - if (db) { - if (db.index === index) { - historyTime = db.time + var time = this.video.info.time + if (!time) { + // 如果video.info.time没有设定的话,从历史中读取时间进度 + const db = await history.find({ site: this.video.key, ids: this.video.info.id }) + if (db) { + if (db.index === index) { + time = db.time + } } } - // 如果video.info.time没有设定的话,从历史中读取时间进度 - const time = this.video.info.time | historyTime this.playVideo(index, time) } },