From 7222c5225f99d387f3b3cdcc0d4601e611109e39 Mon Sep 17 00:00:00 2001 From: luying Date: Fri, 30 Jun 2023 19:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E5=90=8E=E5=8F=B0):=20?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=A4=BC=E5=8C=85=E7=A0=81=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/domain/backEndField/params.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/domain/backEndField/params.ts b/shared/domain/backEndField/params.ts index 52054407b..bb3caca9b 100644 --- a/shared/domain/backEndField/params.ts +++ b/shared/domain/backEndField/params.ts @@ -236,6 +236,7 @@ export class CreateGiftCode { generateType: GIFT_GENERATE_TYPE; // 生成类型 channel: string[] = ['all']; code: string = ''; + type: number = 0; // 类型 constructor(obj: any) { this.name = obj.name; @@ -247,6 +248,7 @@ export class CreateGiftCode { this.generateType = obj.generateType; this.channel = obj.channel; this.code = obj.code; + this.type = obj.type; } checkParams() { @@ -255,6 +257,7 @@ export class CreateGiftCode { for(let { id, count } of this.goods) { if(!isNumber(id) || !isNumber(count)) return false; } + if(this.type != 0 && this.type != 1 && this.type != 2) return false; if(!isTimestamp(this.beginTime) || !isTimestamp(this.endTime)) return false; if(!isNumber(this.codeLen) || this.codeLen <= 0) return false;