liugl
2020-12-15 b0f715433a54c4bc897dd2bc86fa8ab70727b008
app/src/main/java/com/okgoincar/slab/SlabMainActivity.kt
@@ -105,6 +105,7 @@
        } else {
            showNoneNetDialog()
        }
        tv_server_ing.textColor(this, R.color.main_yellow)
    }
@@ -124,6 +125,7 @@
        try {
            mainFragment?.refresh()
            callPersion()
            callHomeNUm()
        } catch (e: Exception) {
        }
@@ -231,8 +233,10 @@
                }
            }
        }
        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")
@@ -252,10 +256,13 @@
            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()
        }
@@ -263,15 +270,28 @@
            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 {