From 51cb181acd1d1784c8d89a097e6f943284e6801a Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Thu, 27 Aug 2020 13:58:05 +0200 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E6=92=AD=E6=94=BE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E6=94=B6=E8=97=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 3cba64c..fb8abc7 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -471,18 +471,21 @@ export default { if (res) { this.$message.info('已存在') } else { - const docs = { - key: this.video.key, - ids: info.id, - name: info.name, - type: info.type, - year: info.year, - last: info.last, - note: info.note - } - star.add(docs).then(res => { - this.$message.success('收藏成功') - this.isStar = true + // Get detail + zy.detail(this.video.key, info.id).then(detailRes => { + const doc = { + key: this.video.key, + ids: info.id, + last: detailRes.last, + name: detailRes.name, + type: detailRes.type, + year: detailRes.year, + note: detailRes.note + } + star.add(doc).then(starRes => { + this.$message.success('收藏成功') + this.isStar = true + }) }) } }).catch(() => {