皮肤:排行榜等增加返回

This commit is contained in:
luying
2021-10-19 15:56:05 +08:00
parent 864f856c1c
commit 86b71f21bf
3 changed files with 9 additions and 6 deletions

View File

@@ -711,16 +711,15 @@ export class FriendHandler {
if (heroList.length <= 0) return resResult(STATUS.HERO_NOT_FIND); if (heroList.length <= 0) return resResult(STATUS.HERO_NOT_FIND);
let list = new Array(); let list = new Array();
for (let { roleId, roleName, hid, hName, ce, lv, star, colorStar, quality, job, skins, attr: heroAttrs, ePlace } of heroList) { for (let { roleId, roleName, hid, hName, ce, lv, star, colorStar, quality, job, skinId, attr: heroAttrs, ePlace } of heroList) {
let curSkin = skins.find(cur => cur.enable);
let equips = await EquipModel.findListByHidAndRole(hisRoleId, hid, EQUIP_SELECT.HERO_DETAIL); let equips = await EquipModel.findListByHidAndRole(hisRoleId, hid, EQUIP_SELECT.HERO_DETAIL);
let attributes = getPlayerMainAttribute(heroAttrs, role.attr); let attributes = getPlayerMainAttribute(heroAttrs, role.attr);
list.push({ list.push({
roleId, roleName, hid, hName, ce, lv, star, colorStar, quality, job, roleId, roleName, hid, hName, ce, lv, star, colorStar, quality, job, skinId,
skin: curSkin ? curSkin.id : 0, equips: equips.map(cur => { equips: equips.map(cur => {
let curEplace = ePlace.find(ccur => cur.ePlaceId == ccur.id) || new EPlace(); let curEplace = ePlace.find(ccur => cur.ePlaceId == ccur.id) || new EPlace();
let { lv = 0, refineLv = 0 } = curEplace; let { lv = 0, refineLv = 0 } = curEplace;
return { ...cur, lv, refineLv } return { ...cur, lv, refineLv }

View File

@@ -19,9 +19,9 @@ export enum ROLE_SELECT {
export enum HERO_SELECT { export enum HERO_SELECT {
ENTRY = '-attr', ENTRY = '-attr',
HERO_DETAIL = 'roleId roleName hid hName ce isReducedCe lv star colorStar quality job skins attr ePlace', HERO_DETAIL = 'roleId roleName hid hName ce isReducedCe lv star colorStar quality job skins attr ePlace skinId',
// 排行榜中lineup字段 // 排行榜中lineup字段
RANK_LINEUP = 'seqId roleId hid star colorStar lv quality job ce isReducedCe updatedAt' RANK_LINEUP = 'seqId roleId hid star colorStar lv quality job ce isReducedCe updatedAt skinId'
} }
export enum EQUIP_SELECT { export enum EQUIP_SELECT {

View File

@@ -104,6 +104,9 @@ export class LineupParam {
@prop({ required: true }) @prop({ required: true })
hid: number; hid: number;
@prop({ required: true })
skinId: number;
@prop({ required: true }) @prop({ required: true })
star: number; star: number;
@@ -121,6 +124,7 @@ export class LineupParam {
constructor(hero: HeroType) { constructor(hero: HeroType) {
this.hid = hero.hid; this.hid = hero.hid;
this.skinId = hero.skinId;
this.star = hero.star; this.star = hero.star;
this.colorStar = hero.colorStar; this.colorStar = hero.colorStar;
this.lv = hero.lv; this.lv = hero.lv;