From 9f3d5bc6d0678c97e08453b93cd4f10e3705e11a Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 16 Sep 2018 16:46:39 +0800 Subject: [PATCH] format --- routes/weatherAlarm/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/weatherAlarm/index.js b/routes/weatherAlarm/index.js index 63cf07aa9..f1af7326e 100644 --- a/routes/weatherAlarm/index.js +++ b/routes/weatherAlarm/index.js @@ -3,7 +3,7 @@ const DateTime = require('luxon').DateTime; const cheerio = require('cheerio'); module.exports = async (ctx) => { - const alarmInfoURL = `http://www.nmc.cn/f/alarm.html`; + const alarmInfoURL = 'http://www.nmc.cn/f/alarm.html'; const html = (await axios.get(alarmInfoURL)).data; const $ = cheerio.load(html); const alarmElements = $('.alarmlist > div:not(.pagination)').toArray(); @@ -18,7 +18,7 @@ module.exports = async (ctx) => { return { title: $aEl.text(), link: `http://www.nmc.cn${link}`, - pubDate: DateTime.fromFormat(dateString, 'yyyyMMddhhmmss', {zone: 'utc+8'}).toRFC2822(), + pubDate: DateTime.fromFormat(dateString, 'yyyyMMddhhmmss', { zone: 'utc+8' }).toRFC2822(), }; }), };