File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { Route } from '@/types';
22import got from '@/utils/got' ;
33import { parseDate } from '@/utils/parse-date' ;
44import timezone from '@/utils/timezone' ;
5+ import queryString from 'query-string' ;
56
67export 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
You can’t perform that action at this time.
0 commit comments