From 1cb28ff86285dc7a393c0ebdca0082171eab9343 Mon Sep 17 00:00:00 2001 From: qizidog <451559450@qq.com> Date: Fri, 24 Feb 2023 04:45:51 +0800 Subject: [PATCH] feat(route): add record number parameter (#11945) * feat(route): add record number parameter * fix(route): use limit instead --- lib/v2/swjtu/jyzpxx.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/v2/swjtu/jyzpxx.js b/lib/v2/swjtu/jyzpxx.js index ffb800c8b..96a534746 100644 --- a/lib/v2/swjtu/jyzpxx.js +++ b/lib/v2/swjtu/jyzpxx.js @@ -4,9 +4,10 @@ const got = require('@/utils/got'); const rootURL = 'https://jiuye.swjtu.edu.cn/career'; module.exports = async (ctx) => { + const limit = Math.min(ctx.query.limit ?? 10, 50); const resp = await got({ method: 'post', - url: `${rootURL}/zpxx/search/zpxx/1/30`, + url: `${rootURL}/zpxx/search/zpxx/1/${limit}`, }); const list = resp.data.data.list;