mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-01 17:48:15 +08:00
* refactor: fix scut namespace * refactor: fix gzhu namespace * refactor: fix scnu namespace * refactor: fix hust namespace * refactor: fix ccnu namespace * refactor: fix sustech namespace * refactor: fix szu namespace remove `/szuyjs` since it's a duplicate of `/szu/yz/:type?` * refactor: fix tongji namespace * refactor: fix ocu namespace * refactor: fix upc namespace * refactor: fix ucas namespace * refactor: fix cas namespace * refactor: fix cau namespace * refactor: remove `/cucyjs` since `/cuc/yz` existed well before that * refactor: fix bit namespace * refactor: fix **undocumented** scau namespace * fix: typo * fix: code scan
30 lines
898 B
JavaScript
30 lines
898 B
JavaScript
const got = require('@/utils/got');
|
|
const { parseDate } = require('@/utils/parse-date');
|
|
|
|
module.exports = async (ctx) => {
|
|
const baseUrl = 'https://gs.sustech.edu.cn';
|
|
const link = `${baseUrl}/#/common/index?current_id=99&id=99`;
|
|
const response = await got(`${baseUrl}/api/www/v1/article/list`, {
|
|
searchParams: {
|
|
page: 1,
|
|
pageSize: 20,
|
|
kw: '',
|
|
sort_id: 99,
|
|
cas_sort_id: 99,
|
|
},
|
|
});
|
|
|
|
const list = response.data.data.items.map((item) => ({
|
|
title: item.title,
|
|
link: `${baseUrl}/#/common/detail?current_id=99&id=99&article_id=${item.id}`,
|
|
pubDate: parseDate(item.published_at, 'YYYY-MM-DD'),
|
|
}));
|
|
|
|
ctx.state.data = {
|
|
title: '南方科技大学研究生院',
|
|
link,
|
|
description: '南方科技大学研招网通知公告',
|
|
item: list,
|
|
};
|
|
};
|