|
@@ -31,9 +31,13 @@ export class home extends Component {
|
|
|
}
|
|
|
|
|
|
onGameOverSettleAccount(res:user_results){
|
|
|
- // 更新本周分数
|
|
|
+ // 更新本周分数、荣誉
|
|
|
tools.mine_rank_data.score = res.max_integral
|
|
|
this.bottom.getComponent(home_bottom).reloadWeekScore()
|
|
|
+ tools.mine_rank_data.city_badge_status = res.city_badge_status
|
|
|
+ tools.mine_rank_data.province_badge_status = res.province_badge_status
|
|
|
+ tools.mine_rank_data.nationwide_badge_status = res.nationwide_badge_status
|
|
|
+ this.bottom.getComponent(home_bottom).reloadHonorData()
|
|
|
}
|
|
|
|
|
|
onGetNewCar(res:user_results){
|
|
@@ -53,6 +57,17 @@ export class home extends Component {
|
|
|
onMsgGuangboRank(msg) {
|
|
|
this.top.getComponent(home_top).reloadGuangboData(msg.notice_list)
|
|
|
this.bottom.getComponent(home_bottom).reloadCountryRankData(msg.ranking_list)
|
|
|
+ if(msg.ranking_list.length>0) {
|
|
|
+ for (let index = 0; index < msg.ranking_list.length; index++) {
|
|
|
+ const element = msg.ranking_list[index]
|
|
|
+ if(element.user_id==userDataManager.user_data.id) {
|
|
|
+ tools.mine_rank_data.nationwide_badge_status = 1
|
|
|
+ this.bottom.getComponent(home_bottom).reloadHonorData()
|
|
|
+ break
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public init(){
|