后台:礼包码区分渠道

This commit is contained in:
luying
2022-04-09 15:20:04 +08:00
parent a23759335e
commit 6b13034c62
9 changed files with 24 additions and 15 deletions

View File

@@ -47,7 +47,8 @@ export class UpdateMailParams {
}
checkParams() {
if(!this.title || !this.content || !this.sendName || !this.reason) return false;
if(!this.title || !this.content || !this.sendName) return false;
if(this.reason && !isString(this.reason)) return false;
if(this.timeType == MAIL_TIME_TYPE.IMMEDIATE) {
if(!this.expire) return false;
} else if (this.timeType == MAIL_TIME_TYPE.DELAY) {
@@ -191,6 +192,7 @@ export class CreateGiftCode {
codeLen: number; // 礼包码位数
remark: string = ''; // 备注
generateType: GIFT_GENERATE_TYPE; // 生成类型
channel: string[] = ['all'];
code: string = '';
constructor(obj: any) {
@@ -201,6 +203,7 @@ export class CreateGiftCode {
this.codeLen = obj.codeLen;
this.remark = obj.remark;
this.generateType = obj.generateType;
this.channel = obj.channel;
this.code = obj.code;
}
@@ -217,6 +220,7 @@ export class CreateGiftCode {
return false
}
if(this.code != undefined && !isString(this.code)) return false
if(!isArray(this.channel)) return false;
return true;
}
}