diff --git a/docs/university.md b/docs/university.md index 924156414..d8693b74a 100644 --- a/docs/university.md +++ b/docs/university.md @@ -440,6 +440,16 @@ xskb1 对应 +## 福州大学 + +### 教务处教务通知 + + + +### 教务处专家讲座 + + + ## 广东工业大学 ### 校内新闻网 diff --git a/lib/router.js b/lib/router.js index 775a9ed53..81a70850e 100644 --- a/lib/router.js +++ b/lib/router.js @@ -867,6 +867,10 @@ router.get('/usst/jwc', require('./routes/universities/usst/jwc')); // 临沂大学 router.get('/lyu/news/:type', require('./routes/universities/lyu/news/index')); +// 福州大学 +router.get('/fzu/jwch', require('./routes/universities/fzu/jwch')); +router.get('/fzu/zjjz', require('./routes/universities/fzu/zjjz')); + // ifanr router.get('/ifanr/:channel?', require('./routes/ifanr/index')); diff --git a/lib/routes/universities/fzu/jwch.js b/lib/routes/universities/fzu/jwch.js new file mode 100644 index 000000000..c6c36bc0c --- /dev/null +++ b/lib/routes/universities/fzu/jwch.js @@ -0,0 +1,23 @@ +const got = require('@/utils/got'); +module.exports = async (ctx) => { + const response = await got({ + method: 'get', + url: `http://jwch.fzu.edu.cn/plus/json.aspx?jid=J131925584886784703&classid=1804&page=1&column=infoid%2Cclassid%2Ctitle%2Cdefaultpic%2Cintro%2Cadddate%2Curl%2Cclassname`, + headers: { + Referer: `http://jwch.fzu.edu.cn/jxtz/`, + }, + }); + const data = response.data.data; + + ctx.state.data = { + title: `福州大学教务处教务通知`, + link: `http://jwch.fzu.edu.cn/jxtz/`, + description: `福州大学教务处教务通知`, + item: data.map((item) => ({ + title: item.title, + description: `${item.title}`, + pubDate: `${item.adddate}`, + link: `${item.url}`, + })), + }; +}; diff --git a/lib/routes/universities/fzu/zjjz.js b/lib/routes/universities/fzu/zjjz.js new file mode 100644 index 000000000..d61f14bb7 --- /dev/null +++ b/lib/routes/universities/fzu/zjjz.js @@ -0,0 +1,23 @@ +const got = require('@/utils/got'); +module.exports = async (ctx) => { + const response = await got({ + method: 'get', + url: `http://jwch.fzu.edu.cn/plus/json.aspx?jid=J131925584886784703&classid=1809&page=1&column=infoid%2Cclassid%2Ctitle%2Cdefaultpic%2Cintro%2Cadddate%2Curl%2Cclassname`, + headers: { + Referer: `http://jwch.fzu.edu.cn/zjjz/`, + }, + }); + const data = response.data.data; + + ctx.state.data = { + title: `福州大学教务处专家讲座`, + link: `http://jwch.fzu.edu.cn/zjjz/`, + description: `福州大学教务处加锡讲坛/信息素养讲座通知`, + item: data.map((item) => ({ + title: item.title, + description: `${item.title}`, + pubDate: `${item.adddate}`, + link: `${item.url}`, + })), + }; +};