From 0fb44d953ab25a53d228b4c1f9381df80e70ee03 Mon Sep 17 00:00:00 2001
From: liugl <liugl@sinata.cn>
Date: 星期一, 21 六月 2021 15:32:23 +0800
Subject: [PATCH] 1。4:处理预约单导致串单的问题 隐藏预约单

---
 app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt b/app/src/main/java/com/okgoincar/base/MainBroadCastReceiver.kt
index f24f73a..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) {
@@ -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