🐞 fix(gvg): 情报页同等级按战力排行
This commit is contained in:
@@ -560,9 +560,16 @@ export class GVGHandler {
|
||||
let leagueCe = leagueGuilds.reduce((pre, cur) => pre + cur.guildCe, 0);
|
||||
let guardCities = cities.filter(cur => cur.guardLeague == league.leagueCode).map(cur => cur.cityId);
|
||||
let data = new LeagueRankInInfoPage(index + 1, league, prepare, leagueCe, guardCities);
|
||||
if(myLeague.leagueCode == league.leagueCode) myRank = data;
|
||||
ranks.push(data);
|
||||
});
|
||||
ranks.sort((a, b) => {
|
||||
if(a.lv == b.lv) return b.leagueCe - a.leagueCe;
|
||||
return b.lv - a.lv;
|
||||
});
|
||||
ranks.forEach((rank, index) => {
|
||||
rank.rank = index + 1;
|
||||
if(myLeague.leagueCode == rank.leagueCode) myRank = rank;
|
||||
});
|
||||
|
||||
if(!myRank) {
|
||||
let myGuilds = await GuildModel.findByCodes(myLeague.guildCodes);
|
||||
|
||||
Reference in New Issue
Block a user