From 5af5d1d3134ebd217630c07245dd072942cbf9a4 Mon Sep 17 00:00:00 2001 From: liugl <liugl@sinata.cn> Date: 星期四, 31 十二月 2020 16:03:18 +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/base/MainBroadCastReceiver.kt | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt b/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt index cc5074c..8c58ed5 100644 --- a/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt +++ b/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt @@ -37,7 +37,7 @@ } else { if (getToken().isNullOrEmpty()) { Handler(Looper.getMainLooper()).post { - toast("开始登录") +// toast("开始登录") } var driverCertificate = intent.getStringExtra("driverCertificate") if (driverCertificate == null) { @@ -63,17 +63,21 @@ private fun loginOut(context: Context?) { var map = getMapByAny() callNet(context!!, Api.loginOut, map) { - + toast("Ok退签") } } private fun toLoginActivity(context: Context?, driverCertificate: String?) { var map = getMapByAny() - map["identification"] = driverCertificate - callNet(context!!, Api.loginByIdentification, map) { + if (driverCertificate.isNullOrEmpty()){ + toast("资格证号:空") + return + } + map["taxiAptitudeCard"] = driverCertificate + callNet(context!!, Api.loginByTaxiAptitudeCard, map) { toast("登录成功") var bean = Gson().fromJson<LoginBean>(it, LoginBean::class.java) - CacheKey.putKeyStr("identification", driverCertificate!!) + CacheKey.putKeyStr("identification", driverCertificate) CacheKey.putKeyStr("appid", bean.data.appid) CacheKey.putKeyStr("token", bean.data.token) CacheKey.putKeyStr("userId", bean.data.id.toString()) -- Gitblit v1.7.1