训练场宝箱展示bug
This commit is contained in:
@@ -34,12 +34,14 @@ export async function mailInit() {
|
||||
let gmMail = new Map<number, any>();
|
||||
let mails = await GMMailModel.getMails();
|
||||
mails.map((o:any)=>{
|
||||
o.id = o._id;
|
||||
let id:string = JSON.stringify(o._id);
|
||||
o.id = id;
|
||||
o.updatedAt = Math.floor(o.updatedAt.getTime()/1000);
|
||||
let mail = gmMail.get(o.serverId);
|
||||
if (!mail)
|
||||
mail = new Map<string, GMMail>();
|
||||
mail.set(o._id, _.pick(o, Object.keys(GMMailKeys)));
|
||||
o.sendName = o.sendName||'系统';
|
||||
mail.set(o.id, _.pick(o, Object.keys(GMMailKeys)));
|
||||
gmMail.set(o.serverId, mail);
|
||||
});
|
||||
return gmMail;
|
||||
@@ -48,12 +50,14 @@ export async function mailInit() {
|
||||
|
||||
export function setMails(mails:GMMail[], gmMail) {
|
||||
mails.map((o:any)=>{
|
||||
o.id = o._id;
|
||||
let id:string = JSON.stringify(o._id);
|
||||
o.id = id;
|
||||
o.updatedAt = Math.floor(o.updatedAt.getTime()/1000);
|
||||
o.sendName = o.sendName||'系统';
|
||||
let mail = gmMail.get(o.serverId);
|
||||
if (!mail)
|
||||
mail = new Map<string, GMMail>();
|
||||
mail.set(o._id, _.pick(o, Object.keys(GMMailKeys)));
|
||||
mail.set(o.id, _.pick(o, Object.keys(GMMailKeys)));
|
||||
gmMail.set(o.serverId, mail);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user