mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 20:44:52 +08:00
无需定义getPage函数
This commit is contained in:
@@ -433,10 +433,9 @@ export default {
|
||||
this.show.classList = false
|
||||
this.list = []
|
||||
this.type = this.classList.find(x => x.name === className)
|
||||
this.getPage().then(res => {
|
||||
if (res) {
|
||||
this.infiniteId += 1
|
||||
}
|
||||
zy.page(this.site.key, this.type.tid).then(res => {
|
||||
this.pagecount = res.pagecount
|
||||
this.infiniteId += 1
|
||||
})
|
||||
},
|
||||
getClass () {
|
||||
@@ -473,19 +472,6 @@ export default {
|
||||
}
|
||||
return this.r18KeyWords.some(v => name.includes(v))
|
||||
},
|
||||
getPage () {
|
||||
return new Promise((resolve, reject) => {
|
||||
const key = this.site.key
|
||||
const type = this.type.tid
|
||||
zy.page(key, type).then(res => {
|
||||
this.pagecount = res.pagecount
|
||||
this.show.body = true
|
||||
resolve(true)
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
infiniteHandler ($state) {
|
||||
const key = this.site.key
|
||||
const type = this.type.tid
|
||||
|
||||
Reference in New Issue
Block a user