diff --git a/src/components/Detail.vue b/src/components/Detail.vue index a123ba5..23b0a97 100644 --- a/src/components/Detail.vue +++ b/src/components/Detail.vue @@ -131,11 +131,12 @@ export default { this.detail.show = false }, starEvent () { - star.find({ site: this.detail.key, ids: this.info.id }).then(res => { + star.find({ key: this.detail.site.key, ids: this.info.id }).then(res => { if (res) { this.$message.info('已存在') } else { const docs = { + key: this.detail.site.key, site: this.detail.site, ids: this.info.id, name: this.info.name, diff --git a/src/components/Film.vue b/src/components/Film.vue index c1c9c8f..11e9d15 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -300,11 +300,12 @@ export default { this.view = 'Play' }, starEvent (site, e) { - star.find({ site: site.key, ids: e.id }).then(res => { + star.find({ key: site.key, ids: e.id }).then(res => { if (res) { this.$message.info('已存在') } else { const docs = { + key: site.key, site: site, ids: e.id, name: e.name, diff --git a/src/components/Play.vue b/src/components/Play.vue index 472abe2..4263f5e 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -461,14 +461,13 @@ export default { }, starEvent () { const info = this.video.info - star.find({ site: this.video.key, ids: info.id }).then(res => { + this.$message.warning('video.key:' + this.video.key) + star.find({ key: this.video.key, ids: info.id }).then(res => { if (res) { - star.remove(res.id).then(e => { - this.$message.info('取消收藏') - this.isStar = false - }) + this.$message.info('已存在') } else { const docs = { + key: this.video.key, site: this.video.key, ids: info.id, name: info.name,