mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-11-28 07:11:44 +08:00
详情页根据历史记录更新videoFlag
This commit is contained in:
@@ -174,7 +174,7 @@ export default {
|
||||
this.view = 'Play'
|
||||
this.detail.show = false
|
||||
} else {
|
||||
const db = await history.find({ site: this.detail.key, ids: this.detail.info.id })
|
||||
const db = await history.find({ site: this.detail.key, ids: this.info.id })
|
||||
if (db) {
|
||||
db.index = n
|
||||
db.detail = this.info
|
||||
@@ -275,6 +275,8 @@ export default {
|
||||
async getDetailInfo () {
|
||||
const id = this.detail.info.ids || this.detail.info.id
|
||||
const cacheKey = this.detail.key + '@' + id
|
||||
const db = await history.find({ site: this.detail.key, ids: id })
|
||||
if (db) this.videoFlag = db.videoFlag
|
||||
if (!this.DetailCache[cacheKey]) {
|
||||
this.DetailCache[cacheKey] = await zy.detail(this.detail.key, id)
|
||||
}
|
||||
@@ -282,7 +284,7 @@ export default {
|
||||
if (res) {
|
||||
this.info = res
|
||||
this.$set(this.info, 'rate', this.DetailCache[cacheKey].rate || '')
|
||||
this.videoFlag = res.fullList[0].flag
|
||||
this.videoFlag = this.videoFlag || res.fullList[0].flag
|
||||
this.videoList = res.fullList[0].list
|
||||
this.videoFullList = res.fullList
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user