press-plus
Version:
32 lines (26 loc) • 1.18 kB
JavaScript
// show_Level_type=2的情况下,表示电竞积分赛图标的样式
// 1乡县级电竞积分赛图标,2市级电竞积分赛图标,3省级电竞积分赛图标,4国级电竞积分赛图标
export const E_SPORTS_ICON_MAP = {
1: 'https://image-1251917893.file.myqcloud.com/tip-project/pubg/pubg-match/rank/icon-gaming1.png',
2: 'https://image-1251917893.file.myqcloud.com/tip-project/pubg/pubg-match/rank/icon-gaming2.png',
3: 'https://image-1251917893.file.myqcloud.com/tip-project/pubg/pubg-match/rank/icon-gaming3.png',
4: 'https://image-1251917893.file.myqcloud.com/tip-project/pubg/pubg-match/rank/icon-gaming4.png',
};
export const E_SPORTS_TITLE_MAP = {
1: '县级选手',
2: '市级选手',
3: '省级选手',
4: '国家选手',
};
export function getESportsInfo(gameInfo = {}) {
// 0表示玩家当前展示经典图标 1表示玩家当前展示巅峰赛图标,2表示玩家当前展示电竞积分赛图标
if (E_SPORTS_ICON_MAP[gameInfo.honorLevel]
// && gameInfo.showLevelType == 2
) {
return {
icon: E_SPORTS_ICON_MAP[gameInfo.honorLevel],
title: E_SPORTS_TITLE_MAP[gameInfo.honorLevel],
};
}
return {};
}