更新一下const的使用

This commit is contained in:
luying
2020-12-09 17:23:15 +08:00
parent 0bec9d8020
commit b052568832
10 changed files with 69 additions and 56 deletions

View File

@@ -194,17 +194,12 @@ export default class GMUsers extends Service {
for(let hid of hids) {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
if(hero) continue;
const seqId = await CounterModel.getNewCounter(COUNTER.HID)||-1;
let dicHero = ctx.service.utils.getHeroById(hid);
if(!dicHero) continue;
if(!dicHero) continue;
let {quality, initialStars: star, jobid: job, name: hName} = dicHero;
const heroInfo = {
roleId,
roleName: role.roleName,
hid: hid,
hName: dicHero.name,
seqId,
lv: hlv,
star: dicHero.quality
roleId, roleName: role.roleName, hid, hName, star, quality, job,
lv: hlv
}
heroInfos.push(heroInfo);
}