| | |
| | | } else { |
| | | showNoneNetDialog() |
| | | } |
| | | tv_server_ing.textColor(this, R.color.main_yellow) |
| | | } |
| | | |
| | | |
| | |
| | | try { |
| | | mainFragment?.refresh() |
| | | callPersion() |
| | | callHomeNUm() |
| | | } catch (e: Exception) { |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | callHomeNUm() |
| | | } |
| | | |
| | | |
| | | fun callHomeNUm(){ |
| | | callNet(true, Api.queryHomeNum, getMapByAny()) { |
| | | var data = gson.fromJson<MainInfoBean>(it, MainInfoBean::class.java) |
| | | if (!data.data.service.isNullOrEmpty() && data.data.service != "0") |
| | |
| | | tv_server_ing.textColor(this, R.color.main_yellow) |
| | | if (getNowTimeBlack()) { |
| | | tv_wait_server.textColor(this, R.color.white) |
| | | iv_small.textColor(this, R.color.white) |
| | | } else { |
| | | tv_wait_server.textColor(this, R.color.black) |
| | | iv_small.textColor(this, R.color.black) |
| | | } |
| | | mainFragment.state = 1 |
| | | mainFragment.type = 1 |
| | | mainFragment.autoRefresh() |
| | | } |
| | | |
| | |
| | | tv_wait_server.textColor(this, R.color.main_yellow) |
| | | if (getNowTimeBlack()) { |
| | | tv_server_ing.textColor(this, R.color.white) |
| | | iv_small.textColor(this, R.color.white) |
| | | } else { |
| | | tv_server_ing.textColor(this, R.color.black) |
| | | iv_small.textColor(this, R.color.black) |
| | | } |
| | | mainFragment.state = 2 |
| | | mainFragment.type = 1 |
| | | mainFragment.autoRefresh() |
| | | } |
| | | |
| | | iv_small.setOnClickListener { |
| | | |
| | | iv_small.textColor(this, R.color.main_yellow) |
| | | if (getNowTimeBlack()) { |
| | | tv_server_ing.textColor(this, R.color.white) |
| | | tv_wait_server.textColor(this, R.color.white) |
| | | } else { |
| | | tv_server_ing.textColor(this, R.color.black) |
| | | tv_wait_server.textColor(this, R.color.black) |
| | | } |
| | | mainFragment.state = 1 |
| | | mainFragment.type = 2 |
| | | mainFragment.autoRefresh() |
| | | } |
| | | |
| | | tv_name.clickDelay { |