排行榜:总览

This commit is contained in:
luying
2021-09-08 19:40:21 +08:00
parent c3931a3043
commit cb59d0aa96
5 changed files with 22 additions and 22 deletions

View File

@@ -269,10 +269,9 @@ export enum RANK_TYPE {
USER_LV = 4, // 主公等级
SUM_CE = 5, // 总战力
TOWER = 6, // 镇念塔
DUNGEON = 7, // 秘境
MAIN = 8, // 主线
MAIN_ELITE = 9, // 精英
GUILD_LV = 10, // 军团按等级排序
MAIN = 7, // 主线
MAIN_ELITE = 8, // 精英
GUILD_LV = 9, // 军团按等级排序
GUILD_ACTIVE = 11, // 军团活跃度排序
HERO = 12, // 武将排行
}
@@ -285,7 +284,7 @@ export const RANK_TYPE_TO_KEY = new Map([
[RANK_TYPE.USER_LV, REDIS_KEY.USER_LV],
[RANK_TYPE.SUM_CE, REDIS_KEY.SUM_CE_RANK],
[RANK_TYPE.TOWER, REDIS_KEY.TOWER_RANK],
[RANK_TYPE.DUNGEON, REDIS_KEY.DUNGEON_RANK],
// [RANK_TYPE.DUNGEON, REDIS_KEY.DUNGEON_RANK],
[RANK_TYPE.MAIN, REDIS_KEY.MAIN_RANK],
[RANK_TYPE.MAIN_ELITE, REDIS_KEY.MAIN_ELITE_RANK],
[RANK_TYPE.GUILD_LV, REDIS_KEY.GUILD_LV_RANK],

View File

@@ -352,13 +352,17 @@ export interface myIdInter {
// 排行榜总览左边的数据
export class GeneralRankParam {
type: number; // 排行榜id
userInfo: RankParam;
userInfo?: RankParam;
num: number;
received: number[];
constructor(type: number, rankInfo: RoleRankInfo, received?: number[]) {
constructor(type: number, rankInfo: RoleRankInfo|GuildRankInfo, general: number, received?: number[]) {
this.type = type;
this.userInfo = pick(rankInfo, ['roleId', 'roleName', 'head', 'frame', 'spine', 'guildName', 'ce', 'title', 'lv']);
if(general == 1) {
if(rankInfo instanceof RoleRankInfo) {
this.userInfo = pick(rankInfo, ['roleId', 'roleName', 'head', 'frame', 'spine', 'guildName', 'ce', 'title', 'lv']);
}
}
this.num = rankInfo.num;
this.received = received;
}