训练场宝箱展示bug

This commit is contained in:
mamengke01
2021-02-06 11:56:18 +08:00
parent d9bea0444c
commit d9458ede5f
22 changed files with 246 additions and 108 deletions
+8 -4
View File
@@ -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);
});
}