|
@@ -25,21 +25,22 @@ export class home extends Component {
|
|
|
this.node.parent.active = false
|
|
|
})
|
|
|
ClientEvent.on(config.UI_EVENT.GET_NEW_CAR,this.onGetNewCar.bind(this),this)
|
|
|
- this.reloadCountryRankData()
|
|
|
+ ClientEvent.on(config.UI_EVENT.UPDATE_USER_DEFAULT_CAR,this.onUpdateUserDefaultCar.bind(this),this)
|
|
|
}
|
|
|
|
|
|
onGetNewCar(){
|
|
|
console.log("获取新车:",dataManager.getCarInfoById(userDataManager.user_car_list.default_car_id))
|
|
|
}
|
|
|
+
|
|
|
+ onUpdateUserDefaultCar() {
|
|
|
+ this.home_car.getComponent(home_car).updateCar()
|
|
|
+ }
|
|
|
+
|
|
|
public init(){
|
|
|
this.home_car.getComponent(home_car).updateCar()
|
|
|
this.top.getComponent(home_top).init()
|
|
|
this.bottom.getComponent(home_bottom).init()
|
|
|
}
|
|
|
-
|
|
|
- public reloadCountryRankData() {
|
|
|
- this.bottom.getComponent(home_bottom).reloadCountryRankData()
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
|