From d1a3fc7c26b9196868ab34d12cfb9832f57956da Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Sat, 7 Dec 2019 18:39:44 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E4=BB=BD=20app=20=E5=86=85?= =?UTF-8?q?=E8=B4=AD=E7=A9=BA=E5=80=BC=E7=9A=84=E9=97=AE=E9=A2=98=20(#3544?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #3490 --- lib/routes/apple/appstore/in-app-purchase.js | 24 +++++++++----------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/routes/apple/appstore/in-app-purchase.js b/lib/routes/apple/appstore/in-app-purchase.js index 6153adc61..cab5f2de8 100644 --- a/lib/routes/apple/appstore/in-app-purchase.js +++ b/lib/routes/apple/appstore/in-app-purchase.js @@ -35,22 +35,20 @@ module.exports = async (ctx) => { let title; let item = []; - const iap = apiResponse.relationships['merchandised-in-apps'].data; + const iap = apiResponse.relationships['top-in-apps'].data; if (iap) { title = `${country === 'cn' ? '内购限免提醒' : 'IAP price watcher'}: ${titleTemp} for ${platform}`; - item = iap - .filter((e) => e.attributes.isMerchandisedEnabled) - .map((e) => { - const title = `${e.attributes.name} is now ${e.attributes.offers[0].priceFormatted}`; - return { - link, - guid: e.attributes.url, - description: e.attributes.description.standard, - title, - pubDate: new Date().toUTCString(), - }; - }); + item = iap.map((e) => { + const title = `${e.attributes.name} is now ${e.attributes.offers[0].priceFormatted}`; + return { + link, + guid: e.attributes.url, + description: e.attributes.description.standard + `
`, + title, + pubDate: new Date().toUTCString(), + }; + }); } ctx.state.data = {