From b023b6034ea0f47fbafb396fa530c8e2eb7ba27b Mon Sep 17 00:00:00 2001 From: wushijishan <65406369+wushijishan@users.noreply.github.com> Date: Sat, 17 Jul 2021 17:11:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20=E4=BA=8C=E6=9F=84APP=20(#7799)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: auto-bot-ty <75887908+auto-bot-ty@users.noreply.github.com> Co-authored-by: auto-bot-ty <1093034894@qq.com> --- lib/routes/erbingapp/news.js | 67 ++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/lib/routes/erbingapp/news.js b/lib/routes/erbingapp/news.js index b09d19920..411474b34 100644 --- a/lib/routes/erbingapp/news.js +++ b/lib/routes/erbingapp/news.js @@ -1,42 +1,51 @@ const got = require('@/utils/got'); +const timezone = require('@/utils/timezone'); +const { parseDate } = require('@/utils/parse-date'); module.exports = async (ctx) => { const response = await got({ method: 'get', url: `https://api.diershoubing.com:5001/feed/tag/?pn=0&rn=20&tag_type=0&src=ios`, - resolveBodyOnly: true, - responseType: 'json', }); - const data = response.feeds; + const data = JSON.parse(response.body).feeds; + const items = data.map((item) => { + let description = `
${item.content}
`; + const acontent = item.acontent.toString(); + const ProcessDesc = (link, type) => { + if (type) { + description += ``; + } else { + for (const item of link) { + description += `