From 7af83ecd451c8372aef5fecdff00e2421a028a16 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 30 Apr 2021 11:13:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=97=AE=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/content/Puzzle.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/models/content/Puzzle.ts b/src/models/content/Puzzle.ts index ba90cae..de93758 100644 --- a/src/models/content/Puzzle.ts +++ b/src/models/content/Puzzle.ts @@ -55,7 +55,7 @@ class PuzzleClass extends BaseModule { public createtime: Date public static parseQueryParam(params) { - let {key, timeBegin, timeEnd, tag, sub_tag, groups } = params + let {key, timeBegin, timeEnd, tag, sub_tag, groups, dp, quality } = params let opt: any = {deleted: 0, is_hide: 0} if (key) { opt.question = {$regex: key, $options: 'i'} @@ -69,6 +69,12 @@ class PuzzleClass extends BaseModule { if (groups) { Object.assign(opt, {groups}) } + if (quality != undefined) { + opt.quality = quality + } + if (dp != undefined) { + opt.dp = dp + } if (timeBegin && !timeEnd) { opt.createtime = {$gte: timeBegin}; } else if (timeBegin && timeEnd) {