fix: add more categories for shou (#5165)

This commit is contained in:
Swung 2020-07-10 14:14:05 +08:00 committed by GitHub
parent bffb7200e4
commit 10a31d3e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -1193,7 +1193,13 @@ type 列表:
### 官网信息
<Route author="Swung0x48" example="/shou/www/tzgg" path="/shou/www/:type" :paramsDesc="['tzgg 为通知公告, zbxx 为招标信息']"/>
<Route author="Swung0x48" example="/shou/www/tzgg" path="/shou/www/:type" :paramsDesc="['消息类型']">
| 通知公告 | 招标信息 | 要闻 | 媒体聚焦 | 学术讲座 | 科技前沿 |
| -------- | -------- | ---- | -------- | -------- | -------- |
| tzgg | zbxx | yw | mtjj | xsjz | xsqy |
</Route>
## 上海交通大学

View File

@ -33,7 +33,15 @@ const ProcessFeed = async (list, caches) =>
module.exports = async (ctx) => {
const type = ctx.params.type;
const readableType = type === 'zbxx' ? '招标信息' : '通知公告';
const dict = {
zbxx: '招标信息',
tzgg: '通知公告',
yw: '要闻',
mtjj: '媒体聚焦',
xsjz: '学术讲座',
xsqy: '科技前沿',
};
const readableType = dict[type];
const response = await got({
method: 'get',
url: `${host}/${type}/list.htm`,