| | |
| | | Handler(Looper.getMainLooper()).post { |
| | | val b = intent.getBooleanExtra("isLogin",true) |
| | | if (!b){ |
| | | loginOut(contexts) |
| | | CacheUtil.get().clear() |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.OUT_APP)) |
| | | }else{ |
| | |
| | | } |
| | | var driverCertificate = intent.getStringExtra("driverCertificate") |
| | | if (driverCertificate == null){ |
| | | toast("身份证获取失败") |
| | | // toast("身份证获取失败") |
| | | }else{ |
| | | if (contexts == null){ |
| | | toast("上下文为空,使用全局跳转") |
| | | // toast("上下文为空,使用全局跳转") |
| | | toLoginActivity(MyApplication.getInstance(),driverCertificate) |
| | | }else{ |
| | | toLoginActivity(MyApplication.getInstance(),driverCertificate) |
| | |
| | | |
| | | } |
| | | |
| | | private fun loginOut(context: Context?) { |
| | | var map = getMapByAny() |
| | | callNet(context!!, Api.loginOut, map) { |
| | | |
| | | } |
| | | } |
| | | |
| | | private fun toLoginActivity(context: Context?,driverCertificate: String?) { |
| | | var map = getMapByAny() |
| | | map["identification"] = driverCertificate |