From b09cf324f98173820071b29486594eedd8b090f9 Mon Sep 17 00:00:00 2001 From: Minaduki Shigure Date: Mon, 15 Apr 2024 17:51:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20=E5=8D=97=E4=BA=AC=E5=A4=A7?= =?UTF-8?q?=E5=AD=A6=20=E6=9C=AC=E7=A7=91=E7=94=9F=E9=99=A2=E6=95=99?= =?UTF-8?q?=E5=8A=A1=20(#15238)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/nju/jw.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/routes/nju/jw.ts b/lib/routes/nju/jw.ts index 92985f0e1..341ec261b 100644 --- a/lib/routes/nju/jw.ts +++ b/lib/routes/nju/jw.ts @@ -2,6 +2,7 @@ import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; +import queryString from 'query-string'; export const route: Route = { path: '/jw/:type', @@ -50,17 +51,18 @@ async function handler(ctx) { const { data } = await got({ method: 'post', url: 'https://jw.nju.edu.cn/_wp3services/generalQuery?queryObj=articles', - form: { + body: queryString.stringify({ siteId: 414, columnId: type_dict[type][0], pageIndex: 1, rows: 24, // 用大一点的值,因为前面太多置顶的 orders: type_dict[type][2], returnInfos: type_dict[type][3], - }, + }), headers: { Origin: 'https://jw.nju.edu.cn', Referer: 'https://jw.nju.edu.cn/main.htm', + 'Content-Type': 'application/x-www-form-urlencoded', }, });