From 6e3753012c4206782e686b95e997d59e486a33ea Mon Sep 17 00:00:00 2001 From: Chenyang Shi Date: Mon, 13 May 2019 16:29:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=96=E6=B1=87=E7=89=8C=E4=BB=B7?= =?UTF-8?q?=E7=9A=84description=20=E6=94=BE=E8=BF=9Btitle=20(#2118)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/boc/whpj.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/routes/boc/whpj.js b/lib/routes/boc/whpj.js index 47522a548..16467e59b 100644 --- a/lib/routes/boc/whpj.js +++ b/lib/routes/boc/whpj.js @@ -17,19 +17,20 @@ module.exports = async (ctx) => { .text()} ${$(this) .find('td:nth-child(8)') .text()}`; + const content = `现汇买入价:${$(this) + .find('td:nth-child(2)') + .text()} 现钞买入价:${$(this) + .find('td:nth-child(3)') + .text()} 现汇卖出价:${$(this) + .find('td:nth-child(4)') + .text()} 现钞卖出价:${$(this) + .find('td:nth-child(5)') + .text()} 中行折算价:${$(this) + .find('td:nth-child(6)') + .text()}`; const info = { - title: name, - description: `现汇买入价:${$(this) - .find('td:nth-child(2)') - .text()}
现钞买入价:${$(this) - .find('td:nth-child(3)') - .text()}
现汇卖出价:${$(this) - .find('td:nth-child(4)') - .text()}
现钞卖出价:${$(this) - .find('td:nth-child(5)') - .text()}
中行折算价:${$(this) - .find('td:nth-child(6)') - .text()}
`, + title: name + ' ' + content, + description: content.replace(/\s/g, '
'), pubDate: new Date(date).toUTCString(), guid: name + date, };