diff --git a/docs/game.md b/docs/game.md index f814f15a1a..0eb898ac27 100644 --- a/docs/game.md +++ b/docs/game.md @@ -539,6 +539,10 @@ Example:`https://www.iyingdi.com/tz/people/55547` ,id 是 `55547` +### アークナイツ(日服新闻) + + + ### 塞壬唱片 diff --git a/lib/router.js b/lib/router.js index dea262cdbc..c25f87230d 100644 --- a/lib/router.js +++ b/lib/router.js @@ -1986,6 +1986,8 @@ router.get('/tencent/pvp/newsindex/:type', lazyloadRouteHandler('./routes/tencen // 《明日方舟》游戏 router.get('/arknights/news', lazyloadRouteHandler('./routes/arknights/news')); +// アークナイツ(明日方舟日服) +router.get('/arknights/japan', lazyloadRouteHandler('./routes/arknights/japan')); // 塞壬唱片 router.get('/siren/news', lazyloadRouteHandler('./routes/siren/index')); diff --git a/lib/routes/arknights/japan.js b/lib/routes/arknights/japan.js new file mode 100644 index 0000000000..3e0d7630d1 --- /dev/null +++ b/lib/routes/arknights/japan.js @@ -0,0 +1,26 @@ +const got = require('@/utils/got'); + +module.exports = async (ctx) => { + + const response = await got({ + method: 'get', + url: 'https://www.arknights.jp:10014/news?lang=ja&limit=9&page=1', + }); + + const items = response.data.data.items; + const newsList = items.map((item) => ({ + title: item.title, + description: item.content[0].value, + pubDate: item.publishedAt, + link: `https://www.arknights.jp/news/${item.id}` + })); + + ctx.state.data = { + title: 'アークナイツ', + link: 'https://www.arknights.jp/news', + description: 'アークナイツ ニュース', + language: 'ja', + item: newsList, + }; + +}; \ No newline at end of file