mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-13 15:35:28 +08:00
在star中添加key信息
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user