✨ feat(服务器): 多服务器开服
This commit is contained in:
@@ -183,6 +183,38 @@ export class CreateRegionParam {
|
||||
}
|
||||
}
|
||||
|
||||
export class CreateServersParam {
|
||||
env: string = '';
|
||||
openTime: number[] = [];
|
||||
activityGroupId: number[] = [];
|
||||
hasOpenMail: boolean = false;
|
||||
openMail?: GMMail;
|
||||
// hasCircleMail: boolean = false;
|
||||
// circleMail?: GMMail;
|
||||
stopRegisterTime: number = 0;
|
||||
|
||||
constructor(obj?: any) {
|
||||
if(obj) {
|
||||
for(let key in obj) {
|
||||
this[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
// console.log('##### createNew', this.env, this.openTime, this.stopRegisterTime, this.hasOpenMail, this.hasCircleMail)
|
||||
if(!this.env || !this.openTime || !this.stopRegisterTime ) {
|
||||
return false
|
||||
}
|
||||
if(!isArray(this.openTime)) return false;
|
||||
for(let time of this.openTime) {
|
||||
if(!isNumber(time)) return false;
|
||||
}
|
||||
if(this.hasOpenMail && !this.openMail) return false;
|
||||
// if(this.hasCircleMail && !this.circleMail) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
export class CreateServerParam {
|
||||
env: string = '';
|
||||
openTime: number = 0;
|
||||
@@ -214,16 +246,6 @@ export class CreateServerParam {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
checkParams() {
|
||||
// console.log('##### createNew', this.env, this.openTime, this.stopRegisterTime, this.hasOpenMail, this.hasCircleMail)
|
||||
if(!this.env || !this.openTime || !this.stopRegisterTime ) {
|
||||
return false
|
||||
}
|
||||
if(this.hasOpenMail && !this.openMail) return false;
|
||||
// if(this.hasCircleMail && !this.circleMail) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class CreateGiftCode {
|
||||
|
||||
Reference in New Issue
Block a user