排行榜:虚位以待

This commit is contained in:
luying
2022-08-21 18:12:03 +08:00
parent 31c17c7366
commit b0abc4660f
2 changed files with 6 additions and 3 deletions
+3 -3
View File
@@ -1223,8 +1223,8 @@ export async function getRankInHandler(redisKey: REDIS_KEY, type: RANK_TYPE, key
myRank = await r.generMyRankWithRole(roleId, 0, 0, role); myRank = await r.generMyRankWithRole(roleId, 0, 0, role);
} }
} }
if(type == RANK_TYPE.LADDER) { // if(type == RANK_TYPE.LADDER) {
ranks = completeLadderRanks(ranks); // ranks = completeLadderRanks(ranks);
} // }
return { ranks, myRank } return { ranks, myRank }
} }
+3
View File
@@ -222,6 +222,7 @@ export class RoleAndGuildRankInfo {
userInfo?: RankParam & { roleId: string }; userInfo?: RankParam & { roleId: string };
lineup?: LineupParam[]; lineup?: LineupParam[];
guildInfo?: GuildRankParam & { code: string, active?: number }; guildInfo?: GuildRankParam & { code: string, active?: number };
hasUser: boolean = false;
constructor(rank: number, num: number) { constructor(rank: number, num: number) {
this.rank = rank; this.rank = rank;
@@ -231,11 +232,13 @@ export class RoleAndGuildRankInfo {
setUserInfo(role: RoleRankInfo) { setUserInfo(role: RoleRankInfo) {
this.userInfo = pick(role, ['roleId', 'roleName', 'head', 'frame', 'spine', 'lv', 'title', 'guildName', 'ce', 'topLineupCe']); this.userInfo = pick(role, ['roleId', 'roleName', 'head', 'frame', 'spine', 'lv', 'title', 'guildName', 'ce', 'topLineupCe']);
this.lineup = role.lineup; this.lineup = role.lineup;
this.hasUser = true;
} }
setGuildInfo(guild: GuildRankInfo) { setGuildInfo(guild: GuildRankInfo) {
this.guildInfo = pick(guild, ['code', 'icon', 'name', 'leader', 'guildCe', 'lv', 'memberCnt']); this.guildInfo = pick(guild, ['code', 'icon', 'name', 'leader', 'guildCe', 'lv', 'memberCnt']);
this.guildInfo.active = guild.num1; this.guildInfo.active = guild.num1;
this.hasUser = true;
} }
isMyInfo(myId: myIdInter) { isMyInfo(myId: myIdInter) {