后台:礼包码区分渠道
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user