From 40a8a2c243c15fe8d4eb46f4dbc42a290bd0a63a Mon Sep 17 00:00:00 2001 From: liugl <liugl@sinata.cn> Date: 星期四, 10 九月 2020 15:34:08 +0800 Subject: [PATCH] 9.10 --- app/src/main/java/com/okgoincar/slab/SlabMainActivity.kt | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/okgoincar/slab/SlabMainActivity.kt b/app/src/main/java/com/okgoincar/slab/SlabMainActivity.kt index d38a759..e50b41e 100644 --- a/app/src/main/java/com/okgoincar/slab/SlabMainActivity.kt +++ b/app/src/main/java/com/okgoincar/slab/SlabMainActivity.kt @@ -91,7 +91,6 @@ } override fun initView() { - tv_title_top.text = "服 务 监 督 卡 I" if (NetUtils.isNetworkConnected(this)){ setTitleText("OK出行司机") showHeader(false) @@ -151,6 +150,7 @@ var view = dialog.contentView view.tv_close_base.text = cancelStr view.tv_sure_base.text = sureStr + view.tv_close_base.gone() view.tv_close_base.setOnClickListener { dialog.dismiss() clickClose() @@ -167,6 +167,7 @@ private fun showUI(data: UserInfoBean?) { data?.let { + tv_title_top.text = "服 务 监 督 卡" if (data.taxiAptitudeCard.length > 7){ tv_code_num.text = "资格证号:"+data.taxiAptitudeCard.substring(0,3)+"*******"+data.taxiAptitudeCard.substring(data.taxiAptitudeCard.length-4,data.taxiAptitudeCard.length) }else{ @@ -400,10 +401,12 @@ var identification = CacheKey.getKeyStr("identification") if (jobNum.isNotEmpty()) { var map = getMapByAny() - map["jobNum"] = jobNum - callNet(true, Api.loginByJobNumber, map) { - var bean = gson.fromJson<LoginBean>(it, LoginBean::class.java) - CacheKey.putKeyStr("jobNum", jobNum) + map["taxiAptitudeCard"] = identification + callNet(this, Api.loginByTaxiAptitudeCard, map,{ + ok() + }) { + var bean = Gson().fromJson<LoginBean>(it, LoginBean::class.java) + CacheKey.putKeyStr("identification", identification) CacheKey.putKeyStr("appid", bean.data.appid) CacheKey.putKeyStr("token", bean.data.token) CacheKey.putKeyStr("userId", bean.data.id.toString()) @@ -413,8 +416,8 @@ } } else if (identification.isNotEmpty()) { var map = getMapByAny() - map["identification"] = identification - callNet(true, Api.loginByIdentification, map) { + map["taxiAptitudeCard"] = identification + callNet(true, Api.loginByTaxiAptitudeCard, map) { var bean = Gson().fromJson<LoginBean>(it, LoginBean::class.java) CacheKey.putKeyStr("identification", identification) CacheKey.putKeyStr("appid", bean.data.appid) -- Gitblit v1.7.1