From 75ba68eb8d65a32251704c604b3e27f3121808ce Mon Sep 17 00:00:00 2001 From: liugl <liugl@sinata.cn> Date: 星期四, 07 一月 2021 09:22:58 +0800 Subject: [PATCH] Merge branches 'cargo_small' and 'master' of http://sinata.cn:10101/gitblit/r/android/OkGoinCar into cargo_small --- app/src/main/java/com/okgoincar/netUtls/NetKit.kt | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/app/src/main/java/com/okgoincar/netUtls/NetKit.kt b/app/src/main/java/com/okgoincar/netUtls/NetKit.kt index 023a983..9c556c9 100644 --- a/app/src/main/java/com/okgoincar/netUtls/NetKit.kt +++ b/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() } }) } @@ -160,6 +171,7 @@ override fun onError(code: Int, msg: String?, resposeString: String?) { super.onError(code, msg, resposeString) + dismissDialog() clickActionError(msg) } }) @@ -186,6 +198,12 @@ clickAction(responseString) } + override fun onError(code: Int, msg: String?, resposeString: String?) { + super.onError(code, msg, resposeString) + if (showDialog) + dismissDialog() + } + }) } @@ -209,6 +227,7 @@ } override fun onError(code: Int, msg: String?, resposeString: String?) { + dismissDialog() clickActionError(resposeString) } }) @@ -236,7 +255,7 @@ override fun onError(code: Int, msg: String?, resposeString: String?) { super.onError(code, msg, resposeString) - + dismissDialog() clickActionError(msg) } }) @@ -257,6 +276,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 +338,7 @@ val timer by lazy { object : CountDownTimer(timeDown, 1000) { override fun onFinish() { + click(0) } override fun onTick(millisUntilFinished: Long) { -- Gitblit v1.7.1