| | |
| | | } |
| | | |
| | | override fun initView() { |
| | | tv_title_top.text = "服 务 监 督 卡 I" |
| | | if (NetUtils.isNetworkConnected(this)){ |
| | | setTitleText("OK出行司机") |
| | | showHeader(false) |
| | |
| | | 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() |
| | |
| | | |
| | | 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{ |
| | |
| | | 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()) |
| | |
| | | } |
| | | } 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) |