Skip to content

Commit b09cf32

Browse files
fix(route): 南京大学 本科生院教务 (#15238)
1 parent dc093eb commit b09cf32

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/routes/nju/jw.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Route } from '@/types';
22
import got from '@/utils/got';
33
import { parseDate } from '@/utils/parse-date';
44
import timezone from '@/utils/timezone';
5+
import queryString from 'query-string';
56

67
export const route: Route = {
78
path: '/jw/:type',
@@ -50,17 +51,18 @@ async function handler(ctx) {
5051
const { data } = await got({
5152
method: 'post',
5253
url: 'https://jw.nju.edu.cn/_wp3services/generalQuery?queryObj=articles',
53-
form: {
54+
body: queryString.stringify({
5455
siteId: 414,
5556
columnId: type_dict[type][0],
5657
pageIndex: 1,
5758
rows: 24, // 用大一点的值,因为前面太多置顶的
5859
orders: type_dict[type][2],
5960
returnInfos: type_dict[type][3],
60-
},
61+
}),
6162
headers: {
6263
Origin: 'https://jw.nju.edu.cn',
6364
Referer: 'https://jw.nju.edu.cn/main.htm',
65+
'Content-Type': 'application/x-www-form-urlencoded',
6466
},
6567
});
6668

0 commit comments

Comments
 (0)