From 5c3d6fa348907c340a8d49fa3ee24cf393054441 Mon Sep 17 00:00:00 2001 From: PangBo <51732678+pangbo13@users.noreply.github.com> Date: Sun, 8 Dec 2024 00:21:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(route):=20=E6=B7=BB=E5=8A=A0=20=E4=B8=8A?= =?UTF-8?q?=E6=B5=B7=E4=BA=A4=E9=80=9A=E5=A4=A7=E5=AD=A6=E6=95=99=E5=8A=A1?= =?UTF-8?q?=E5=A4=84=20=E9=9D=A2=E5=90=91=E5=AD=A6=E7=94=9F=E7=9A=84?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=20=E8=B7=AF=E7=94=B1=20(#17823)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add `sjtu/jwc/students` * feat(route/sjtu/jwc): add description for /sjtu/jwc/students --- lib/routes/sjtu/jwc.ts | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/lib/routes/sjtu/jwc.ts b/lib/routes/sjtu/jwc.ts index 3930f8f6a2..8b5ab86912 100644 --- a/lib/routes/sjtu/jwc.ts +++ b/lib/routes/sjtu/jwc.ts @@ -4,7 +4,7 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -const urlRoot = 'https://jwc.sjtu.edu.cn/xwtg'; +const urlRoot = 'https://jwc.sjtu.edu.cn'; async function getFullArticle(link) { const response = await got(link).catch(() => null); @@ -46,9 +46,9 @@ export const route: Route = { name: '教务处通知公告', maintainers: ['SeanChao'], handler, - description: `| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | + description: `| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | 面向学生的通知 | | -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- | - | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge |`, + | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge | students |`, }; async function handler(ctx) { @@ -56,48 +56,52 @@ async function handler(ctx) { const config = { all: { section: '通知通告', - link: '/tztg.htm', + link: '/xwtg/tztg.htm', }, news: { - link: '/xwzx.htm', + link: '/xwtg/xwzx.htm', section: '新闻中心', }, notice: { - link: '/tztg.htm', + link: '/xwtg/tztg.htm', section: '通知通告', }, operation: { - link: '/jxyx.htm', + link: '/xwtg/jxyx.htm', section: '教学运行', }, affairs: { - link: '/zcxw.htm', + link: '/xwtg/zcxw.htm', section: '注册学务', }, yjb: { - link: '/yjb.htm', + link: '/xwtg/yjb.htm', section: '研究办', }, jgb: { - link: '/jgb.htm', + link: '/xwtg/jgb.htm', section: '教改办', }, zhb: { - link: '/zhb.htm', + link: '/xwtg/zhb.htm', section: '综合办', }, language: { - link: '/yywz.htm', + link: '/xwtg/yywz.htm', section: '语言文字', }, party: { - link: '/ghyzb.htm', + link: '/xwtg/ghyzb.htm', section: '工会与支部', }, ge: { - link: '/tsjy.htm', + link: '/xwtg/tsjy.htm', section: '通识教育', }, + students: { + link: '/index/mxxsdtz.htm', + section: '面向学生的通知', + }, }; const sectionLink = urlRoot + config[type].link;