Video中添加site信息

This commit is contained in:
haiyangcui
2020-08-16 23:02:18 +02:00
parent 65dcfa04ae
commit c80c0bd948
4 changed files with 7 additions and 8 deletions

View File

@@ -121,9 +121,9 @@ export default {
playEvent (n) {
history.find({ site: this.detail.key, ids: this.detail.info.id }).then(res => {
if (res) {
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: n } }
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: n, site: this.detail.site } }
} else {
this.video = { key: this.detail.key, info: { id: this.detail.info.id, name: this.detail.info.name, index: n } }
this.video = { key: this.detail.key, info: { id: this.detail.info.id, name: this.detail.info.name, index: n, site: this.detail.site } }
}
})

View File

@@ -292,9 +292,9 @@ export default {
playEvent (site, e) {
history.find({ site: site.key, ids: e.id }).then(res => {
if (res) {
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: res.index } }
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: res.index, site: site } }
} else {
this.video = { key: site.key, info: { id: e.id, name: e.name, index: 0 } }
this.video = { key: site.key, info: { id: e.id, name: e.name, index: 0, site: site } }
}
})
this.view = 'Play'

View File

@@ -461,14 +461,13 @@ export default {
},
starEvent () {
const info = this.video.info
this.$message.warning('video.key:' + this.video.key)
star.find({ key: this.video.key, ids: info.id }).then(res => {
if (res) {
this.$message.info('已存在')
} else {
const docs = {
key: this.video.key,
site: this.video.key,
site: this.video.site,
ids: info.id,
name: info.name,
type: info.type,

View File

@@ -93,9 +93,9 @@ export default {
playEvent (e) {
history.find({ site: e.site.key, ids: e.ids }).then(res => {
if (res) {
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: res.index } }
this.video = { key: res.site, info: { id: res.ids, name: res.name, index: res.index, site: e.site } }
} else {
this.video = { key: e.site.key, info: { id: e.ids, name: e.name, index: 0 } }
this.video = { key: e.site.key, info: { id: e.ids, name: e.name, index: 0, site: e.site } }
}
})
this.view = 'Play'