mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-02 10:08:02 +08:00
22 lines
553 B
JavaScript
22 lines
553 B
JavaScript
const got = require('@/utils/got');
|
|
|
|
module.exports = async (ctx) => {
|
|
const response = await got({
|
|
method: 'get',
|
|
url: 'http://www.ems.com.cn/ems/news/listNews',
|
|
});
|
|
|
|
const items = response.data.map((item) => ({
|
|
title: item.title,
|
|
link: `http://www.ems.com.cn/ems/news/viewNews?id=${item.id}`,
|
|
pubDate: item.postDate,
|
|
description: item.content,
|
|
}));
|
|
|
|
ctx.state.data = {
|
|
title: '中国邮政速递物流',
|
|
link: 'http://www.ems.com.cn/',
|
|
item: items,
|
|
};
|
|
};
|