From a99d1af9a7e4ff043cbaa6329f0b2ae13784e3ec Mon Sep 17 00:00:00 2001 From: cnk Date: Mon, 20 Jan 2025 03:11:10 +0800 Subject: [PATCH] fix(typo|routes/hrbust): fix docs and description (#18165) --- lib/routes/hrbust/jwzx.ts | 8 ++++---- lib/routes/hrbust/news.ts | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/routes/hrbust/jwzx.ts b/lib/routes/hrbust/jwzx.ts index ca132c1e2d..fecdd369c0 100644 --- a/lib/routes/hrbust/jwzx.ts +++ b/lib/routes/hrbust/jwzx.ts @@ -17,9 +17,9 @@ export const route: Route = { - type 可以从 URL 中的 columnId 获取。 - 由于源站未提供精确时间,只能抓取日期粒度的时间。 ::: -| 组织机构 | 工作职责 | 专业设置 | 教务信箱 | 名师风采 | 热点新闻 | 教务公告 | 教学新闻 | 教学管理 | 教务管理 | 学籍管理 | 实践教学 | 系统使用动画 | 教学管理 | 教务管理 | 学籍管理 | 实验教学 | 实践教学 | 教研论文教材认定 | 教学管理 | 学籍管理 | 实践教学 | 网络教学 | 多媒体教室管理 | 实验教学与实验室管理 | 教学成果 | 国创计划 | 学科竞赛 | 微专业 | 众创空间 | 示范基地 | 学生社团 | -|------|------|------|------|------|------|------|------|------|------|------|------|--------|------|------|------|------|------|----------|------|------|------|------|---------|------------|------|------|------|------|------|------|------| -| 339 | 340 | 342 | 346 | 351 | 353 | 354 | 355 | 442 | 443 | 444 | 445 | 2106 | 2332 | 2333 | 2334 | 2335 | 2336 | 2730 | 2855 | 2857 | 2859 | 3271 | 3508 | 3519 | 3981 | 4057 | 4058 | 4059 | 4060 | 4061 | 4062 |`, +| 组织机构 | 工作职责 | 专业设置 | 教务信箱 | 名师风采 | 热点新闻 | 教务公告 | 教学新闻 | 教学管理 | 教务管理 | 学籍管理 | 实践教学 | 系统使用动画 | 教学管理 | 教务管理 | 学籍管理 | 实验教学 | 实践教学 | 教研论文教材认定 | 教学管理 | 学籍管理 | 实践教学 | 网络教学 | 多媒体教室管理 | 实验教学与实验室管理 | 教学成果 | 国创计划 | 学科竞赛 | 微专业 | 众创空间 | 示范基地 | 学生社团 | +|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|--------------|----------|----------|----------|----------|----------|------------------|----------|----------|----------|----------|----------------|----------------------|----------|----------|----------|--------|----------|----------|----------| +| 339 | 340 | 342 | 346 | 351 | 353 | 354 | 355 | 442 | 443 | 444 | 445 | 2106 | 2332 | 2333 | 2334 | 2335 | 2336 | 2730 | 2855 | 2857 | 2859 | 3271 | 3508 | 3519 | 3981 | 4057 | 4058 | 4059 | 4060 | 4061 | 4062 |`, categories: ['university'], features: { requireConfig: false, @@ -68,7 +68,7 @@ async function handler(ctx) { list.map((item) => cache.tryGet(item.link, async () => { if (!item.link.startsWith(JWZXBASE)) { - item.description = '本文需跳转,请点击标题后阅读'; + item.description = '本文需跳转,请点击原文链接后阅读'; return item; } diff --git a/lib/routes/hrbust/news.ts b/lib/routes/hrbust/news.ts index ae8d90c45b..e422fce174 100644 --- a/lib/routes/hrbust/news.ts +++ b/lib/routes/hrbust/news.ts @@ -5,8 +5,6 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -const rootUrl = 'https://news.hrbust.edu.cn/'; - export const route: Route = { path: '/news/:category?', name: '新闻网', @@ -14,10 +12,10 @@ export const route: Route = { maintainers: ['cscnk52'], handler, example: '/hrbust/news', - parameters: { category: '栏目标识,默认为理工要闻' }, - description: `| 理工要闻 | 新闻导读 | 综合新闻 | 教学科研 | 院处动态 | 学术科创 | 交流合作 | 招生就业 | 党建思政 | 在线播放 | 理工校报 | 媒体理工 | 讲座论坛 | -|------|------|--------|------|------|------|------|------|------|------|------|------|------| -| lgyw | xwdd | zhenew | jxky | ycdt | xskc | jlhz | zsjy | djsz | zxbf | lgxb | mtlg | jzlt |`, + parameters: { category: '栏目标识,默认为 lgyw(理工要闻)' }, + description: `| 理工要闻 | 新闻导读 | 综合新闻 | 教学科研 | 院处动态 | 学术科创 | 交流合作 | 招生就业 | 党建思政 | 在线播放 | 理工校报 | 媒体理工 | 讲座论坛 | 人才招聘 | +|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------| +| lgyw | xwdd | zhenew | jxky | ycdt | xskc | jlhz | zsjy | djsz | zxbf | lgxb | mtlg | jzlt | rczp |`, categories: ['university'], features: { supportRadar: true, @@ -36,6 +34,8 @@ export const route: Route = { }; async function handler(ctx) { + const rootUrl = 'https://news.hrbust.edu.cn/'; + const { category = 'lgyw' } = ctx.req.param(); const response = await got(`${rootUrl}${category}.htm`); @@ -62,7 +62,7 @@ async function handler(ctx) { list.map((item) => cache.tryGet(item.link, async () => { if (!item.link.startsWith(rootUrl)) { - item.description = '本文需跳转,请点击标题后阅读'; + item.description = '本文需跳转,请点击原文链接后阅读'; return item; }