后台:邮件审核人
This commit is contained in:
@@ -76,21 +76,12 @@ export class MailParam {
|
||||
}
|
||||
|
||||
setContent(mail: MailType|GroupMailType|ServerMailType) {
|
||||
let { contentId = 0, goods, sendName } = mail;
|
||||
let params = []
|
||||
let { contentId = 0, goods, sendName, content, title } = mail;
|
||||
let dicMail = gameData.mail.get(contentId);
|
||||
if(!dicMail) dicMail = gameData.mail.get(0);
|
||||
|
||||
this.content = this.getContent(dicMail.content, params);
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.sendName = sendName||SEND_NAME;
|
||||
this.goods = goods;
|
||||
}
|
||||
|
||||
getContent(content: string, params: string[]) {
|
||||
if(!content) content = '%d';
|
||||
for(let p of params) {
|
||||
content = content.replace(/%d/, p);
|
||||
}
|
||||
return content
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user