fix(route): アークナイツ(明日方舟日服) (#8436)
This commit is contained in:
parent
5b186041ce
commit
b9bb7555d0
|
|
@ -539,6 +539,10 @@ Example:`https://www.iyingdi.com/tz/people/55547` ,id 是 `55547`
|
|||
|
||||
<Route author="Astrian" example="/arknights/news" path="/arknights/news"/>
|
||||
|
||||
### アークナイツ(日服新闻)
|
||||
|
||||
<Route author="ofyark" example="/arknights/japan" path="/arknights/japan"/>
|
||||
|
||||
### 塞壬唱片
|
||||
|
||||
<Route author="rikkablue" example="/siren/news" path="/siren/news"/>
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
};
|
||||
Loading…
Reference in New Issue