From f8041290d21cfd9826acfba97bea17a6829a4740 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Mon, 30 Nov 2020 23:49:56 +0100 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E9=9C=80=E5=AE=9A=E4=B9=89getPage?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Film.vue | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/components/Film.vue b/src/components/Film.vue index ce7c48b..5eda83d 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -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