|
@@ -15,6 +15,7 @@ export class rank_list_item extends base_ui {
|
|
|
@property(Node) lab_nickname:Node = null;
|
|
|
@property(Node) lab_score:Node = null;
|
|
|
@property(Node) img_car:Node = null;
|
|
|
+ @property(Node) region_bg:Node = null;
|
|
|
@property(Node) lab_region:Node = null;
|
|
|
private m_data:rankData = null
|
|
|
|
|
@@ -26,12 +27,14 @@ export class rank_list_item extends base_ui {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- initView(data:rankData, index) {
|
|
|
+ initView(data:rankData, index, type:number) {
|
|
|
this.m_data = data
|
|
|
this.lab_number.getComponent(Label).string = index+1 + ''
|
|
|
tools.loadRemoteImg(data.avatarUrl, (r)=>{
|
|
|
this.img_avatar.getComponent(Sprite).spriteFrame = r.sf
|
|
|
})
|
|
|
+ if(type==3) { this.region_bg.active = false }
|
|
|
+ else { this.region_bg.active = true }
|
|
|
tools.substringRankRegionName(this.lab_region, data.city_name)
|
|
|
tools.labelCutString(this.lab_nickname,data.nickName,8,false) //this.lab_nickname.getComponent(Label).string = data.nickName
|
|
|
this.lab_score.getComponent(Label).string = data.score + ' 分'
|