From d2c92897e22b2c1992eceaef585f967a06b6ea84 Mon Sep 17 00:00:00 2001 From: liugl <liugl@sinata.cn> Date: 星期一, 02 十一月 2020 15:59:29 +0800 Subject: [PATCH] 11.30 首页列表添加 其他数据用来展示页面 不空 --- app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt b/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt index ff3fc27..8c58ed5 100644 --- a/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt +++ b/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt @@ -69,11 +69,15 @@ 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