From e984d0a3490f81e047d0cf0b96b0739ada991ada Mon Sep 17 00:00:00 2001 From: Hunlongyu Date: Mon, 26 Oct 2020 18:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B3=20=E4=BF=AE=E5=A4=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93,=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=92=AD=E6=94=BE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 8e11600..8fa1194 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -312,8 +312,8 @@ export default { if (db.index === index) { time = db.time } - this.playVideo(index, time) } + this.playVideo(index, time) } }, playUrl (url) { @@ -511,7 +511,14 @@ export default { const info = this.video.info const db = await star.find({ key: this.video.key, ids: info.id }) if (db) { - this.$message.info('已存在') + star.remove(db.id).then(res => { + if (res) { + this.$message.warning('取消收藏失败') + } else { + this.$message.success('取消收藏成功') + this.isStar = false + } + }) } else { const docs = { key: this.video.key, @@ -1018,6 +1025,7 @@ export default { this.xg.src = '' this.config.src = '' this.xg.destroy(false) + this.xg = null this.name = '' this.right.list = [] this.showNext = false