| | |
| | | fun onSwitch(e:EmptyEvent){ |
| | | if (e.code == Const.EventCode.SWITCH_HOME){ |
| | | switchHome() |
| | | }else if(e.code == Const.EventCode.CHANGE_STARTCLASS){ |
| | | tab_bar.currentTab = 1 |
| | | onTabSelect(1) |
| | | }else if(e.code == Const.EventCode.CHANGE_WELFARE){ |
| | | tab_bar.currentTab = 2 |
| | | onTabSelect(2) |
| | |
| | | super.onResume() |
| | | if (tab_bar.currentTab == 1) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.CHANGE_COURSDATA)) |
| | | checkCompetition() |
| | | } |
| | | |
| | | private fun checkCompetition() { |
| | | HttpManager.getCompletedWorldCupTips().request(this,false){_,data-> |
| | | if (data?:0!=0){ |
| | | val competitionTipDialog = CompetitionTipDialog() |
| | | competitionTipDialog.showAllowingStateLoss(supportFragmentManager,"ct") |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onDestroy() { |