From 7aec48e8d0f83c1fd640fef3583a235d07a5b08a Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Fri, 8 Jan 2021 12:41:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AE=80=E9=98=85(simpread)=20changelog?= =?UTF-8?q?=E7=BB=93=E6=9E=84bug=E4=BF=AE=E5=A4=8D=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/simpread/changelog.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/routes/simpread/changelog.js b/lib/routes/simpread/changelog.js index d7ad05d76..5be450af7 100644 --- a/lib/routes/simpread/changelog.js +++ b/lib/routes/simpread/changelog.js @@ -16,19 +16,10 @@ module.exports = async (ctx) => { const month_day = $(item).find('.day').html(); let version = ''; let detail = ''; - - // 结构异化-收个version与后续version不同级 - if (index === 0) { - // 版本名称处理 - version = $($(item).find('.num > a')[0]).clone().children().remove().end().text(); - // detail处理 - detail = $($(item).find('.details')[0]); - } else { - // 版本名称处理 - version = $(item).find('.num > a').clone().children().remove().end().text(); - // detail处理 - detail = $(item).find('.details'); - } + // 版本名称处理 + version = $(item).find('.num > a').clone().children().remove().end().text(); + // detail处理 + detail = $(item).find('.details'); if (version === '') { version = $(item).find('.num').clone().children().remove().end().text(); }