From 21487e2754086849c6f0995a70754949b0721724 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Sat, 2 Jan 2021 23:58:00 +0800 Subject: [PATCH] =?UTF-8?q?Film=E6=B7=BB=E5=8A=A0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=97=B6=E8=BF=87=E6=BB=A4=E6=8E=89=E6=97=A0=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E7=9A=84=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Film.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Film.vue b/src/components/Film.vue index 4d70460..941e88b 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -661,7 +661,7 @@ export default { page = this.totalpagecount - this.pagecount + 1 } this.statusText = ' ' - if (key === undefined || page < 1 || typeTid === undefined) { + if (key === undefined || page < 1 || page > this.totalpagecount || typeTid === undefined) { $state.complete() this.statusText = '暂无数据' return false @@ -675,10 +675,9 @@ export default { if (res) { this.pagecount -= 1 const type = Object.prototype.toString.call(res) - if (type === '[object Undefined]') { - $state.complete() - } if (type === '[object Array]') { + // 过滤掉无链接的项 + res = res.filter(e => e.dl.dd && (e.dl.dd._t || (Object.prototype.toString.call(e.dl.dd) === '[object Array]' && e.dl.dd.some(i => i._t)))) if (!this.toFlipPagecount()) { // zy.list 返回的是按时间从旧到新排列, 我门需要翻转为从新到旧 this.list.push(...res.reverse()) @@ -686,9 +685,10 @@ export default { // 如果是需要解析的视频网站,zy.list已经是按从新到旧排列 this.list.push(...res) } - } - if (type === '[object Object]') { - this.list.push(res) + } else if (type === '[object Object]') { + if (res.dl.dd && (res.dl.dd._t || (Object.prototype.toString.call(res.dl.dd) === '[object Array]' && res.dl.dd.some(e => e._t)))) { + this.list.push(res) + } } $state.loaded() // 更新缓存数据