liugl
2020-09-10 40a8a2c243c15fe8d4eb46f4dbc42a290bd0a63a
app/src/main/java/com/okgoincar/netUtls/NetKit.kt
@@ -51,6 +51,12 @@
            clickAction(responseString)
        }
        override fun onError(code: Int, msg: String?, resposeString: String?) {
            super.onError(code, msg, resposeString)
            if (showDialog)
                dismissDialog()
        }
    })
}
@@ -69,6 +75,11 @@
        override fun success(responseString: String?) {
            dismissDialog()
            clickAction(responseString)
        }
        override fun onError(code: Int, msg: String?, resposeString: String?) {
            super.onError(code, msg, resposeString)
            dismissDialog()
        }
    })
}
@@ -186,6 +197,12 @@
            clickAction(responseString)
        }
        override fun onError(code: Int, msg: String?, resposeString: String?) {
            super.onError(code, msg, resposeString)
            if (showDialog)
                dismissDialog()
        }
    })
}
@@ -209,6 +226,7 @@
        }
        override fun onError(code: Int, msg: String?, resposeString: String?) {
            dismissDialog()
            clickActionError(resposeString)
        }
    })
@@ -236,7 +254,7 @@
        override fun onError(code: Int, msg: String?, resposeString: String?) {
            super.onError(code, msg, resposeString)
            dismissDialog()
            clickActionError(msg)
        }
    })
@@ -257,6 +275,10 @@
    HttpManager.getInstance().post(api, map, object : MyObserver(context) {
        override fun success(responseString: String?) {
            clickAction(responseString)
        }
        override fun onError(code: Int, msg: String?, resposeString: String?) {
            super.onError(code, msg, resposeString)
        }
    })
}
@@ -315,6 +337,7 @@
    val timer by lazy {
        object : CountDownTimer(timeDown, 1000) {
            override fun onFinish() {
                click(0)
            }
            override fun onTick(millisUntilFinished: Long) {