From a9ca8844d436c07f6f57411757b39e0f7dab2ba0 Mon Sep 17 00:00:00 2001 From: Ethan Shen Date: Fri, 20 Aug 2021 14:02:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20=E7=AB=99=E9=85=B7=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E6=9C=89=E8=A7=86=E9=A2=91=E6=9D=A1=E7=9B=AE=20(#8044?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/zcool/discover.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/routes/zcool/discover.js b/lib/routes/zcool/discover.js index f17c18df29..bf7cf0097c 100644 --- a/lib/routes/zcool/discover.js +++ b/lib/routes/zcool/discover.js @@ -57,6 +57,7 @@ module.exports = async (ctx) => { } queries.limit = '20'; queries.page = '1'; + } else { switch (query) { case 'home': @@ -116,15 +117,16 @@ module.exports = async (ctx) => { const videos = detailResponse.data.match(/source: '(https:\/\/video\.zcool\.cn\/.*)',/g); - let i = 0; - content('.video-content-box').each(function () { - if (i >= videos.length) { - return; - } - content(this).append(`