From 6cb39ad5234b556b93fd83da4ec807118c77bc21 Mon Sep 17 00:00:00 2001 From: dy Date: Wed, 20 Dec 2023 21:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=B4=B9=E7=AB=9E=E8=B5=9Blimit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/xiaofeijingsai/ApiOpen.ts | 2 +- src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/event/xiaofeijingsai/ApiOpen.ts b/src/api_s2c/event/xiaofeijingsai/ApiOpen.ts index 8eb9645..1473ee6 100644 --- a/src/api_s2c/event/xiaofeijingsai/ApiOpen.ts +++ b/src/api_s2c/event/xiaofeijingsai/ApiOpen.ts @@ -20,7 +20,7 @@ export default async function (call: ApiCall) { let _hd = (await HuoDongFun.gethdList(call, 11))[0] if (!_hd) return call.errorCode(-1) - let limit = call.req.limit || 50 + let limit = _hd.data?.rank?.slice(-1)?.[0]?.rank?.slice(-1)?.[0] || call.req.limit || 100 let rmbuse = await G.mongodb.collection('rmbuse').aggregate([ {$match: {isAdd: false, cTime: {$gte: _hd.stime, $lte: _hd.etime}}}, diff --git a/src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts b/src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts index cf5b512..675b479 100644 --- a/src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts +++ b/src/shared/protocols/event/xiaofeijingsai/PtlOpen.ts @@ -2,7 +2,7 @@ * 消费竞赛 */ export type ReqOpen = { - limit: number + limit?: number }; export type ResOpen = {