From 81b5391f64ecf948f3e0b7f321aa0d9691c4d935 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Thu, 31 Dec 2020 20:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=9B=B4=E6=96=B0videoFlag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Detail.vue b/src/components/Detail.vue index 1b366dc..e23e1cf 100644 --- a/src/components/Detail.vue +++ b/src/components/Detail.vue @@ -174,7 +174,7 @@ export default { this.view = 'Play' this.detail.show = false } else { - const db = await history.find({ site: this.detail.key, ids: this.detail.info.id }) + const db = await history.find({ site: this.detail.key, ids: this.info.id }) if (db) { db.index = n db.detail = this.info @@ -275,6 +275,8 @@ export default { async getDetailInfo () { const id = this.detail.info.ids || this.detail.info.id const cacheKey = this.detail.key + '@' + id + const db = await history.find({ site: this.detail.key, ids: id }) + if (db) this.videoFlag = db.videoFlag if (!this.DetailCache[cacheKey]) { this.DetailCache[cacheKey] = await zy.detail(this.detail.key, id) } @@ -282,7 +284,7 @@ export default { if (res) { this.info = res this.$set(this.info, 'rate', this.DetailCache[cacheKey].rate || '') - this.videoFlag = res.fullList[0].flag + this.videoFlag = this.videoFlag || res.fullList[0].flag this.videoList = res.fullList[0].list this.videoFullList = res.fullList this.loading = false