feat: add 好队友 rss (#3455)

close #3448
This commit is contained in:
lotosbin
2019-11-21 11:16:07 +08:00
committed by DIYgod
parent fbfe1635f6
commit 1409e25df0
3 changed files with 33 additions and 0 deletions

View File

@@ -226,6 +226,12 @@ type 为 all 时category 参数不支持 cost 和 free
<Route author="junfengP" example="/metred/fuli" path="/metred/fuli" />
## 好队友
### 工作机会
<Route author="lotosbin" example="/network360/jobs" path="/network360/jobs"/>
## 古诗文网
### 首页推荐

View File

@@ -1780,6 +1780,9 @@ router.get('/cneb/guoneinews', require('./routes/cneb/guoneinews'));
// 邮箱
router.get('/mail/imap/:email', require('./routes/mail/imap'));
// 好队友
router.get('/network360/jobs', require('./routes/network360/jobs'));
// 智联招聘
router.get('/zhilian/:city/:keyword', require('./routes/zhilian/index'));

View File

@@ -0,0 +1,24 @@
const got = require('@/utils/got');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: `https://ourwork-api.nework360.com/needs/listHotJobs?pageNum=1&limit=100`,
});
const data = response.data.data;
const items = data.map((jobDetail) => ({
title: jobDetail.jobName,
link: `https://ourwork.nework360.com/project/detail/${jobDetail.needsId}`,
author: jobDetail.nickname,
description: jobDetail.description,
pubDate: new Date(jobDetail.createTime).toUTCString(),
}));
ctx.state.data = {
title: '好队友-远程工作',
link: 'https://ourwork.nework360.com/job/list',
item: items,
};
};