| | |
| | | import android.widget.Toast |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import cn.sinata.rxnetty.Cache.CacheUtil |
| | | import cn.sinata.rxnetty.NettyClient |
| | | import cn.sinata.xldutils.utils.* |
| | | import com.amap.api.location.AMapLocation |
| | |
| | | |
| | | private fun showUI(data: UserInfoBean?) { |
| | | data?.let { |
| | | tv_code_num.text = "资格证号:" + data.taxiAptitudeCard |
| | | 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{ |
| | | tv_code_num.text = "资格证号:" + data.taxiAptitudeCard |
| | | } |
| | | tv_name.text = "姓名:" + it.name |
| | | tv_car_num.text = "车牌:" + it.licensePlate |
| | | recycler_view_start.layoutManager = |
| | |
| | | false |
| | | ) as RecyclerView.LayoutManager? |
| | | recycler_view_start.adapter = SlabStartAdapter(it.score.toDouble()) |
| | | tv_company.text = "公司:" + it.company |
| | | var company = it.company |
| | | if (company.startsWith("广西")){ |
| | | company = company.substring(2,company.length) |
| | | } |
| | | tv_company.text = "公司:" + company |
| | | tv_time.text = "发证日期:" + it.networkCarlssueDate |
| | | GlideUtil.load(this, it.avatar, iv_head, 8) |
| | | tv_current_time.text = DateUtil.getTime( |
| | | DateUtil.TYPE7, |
| | | System.currentTimeMillis() |
| | | ) + "\n" + DateUtil.getWeek(System.currentTimeMillis()) |
| | | ) + DateUtil.getWeek(System.currentTimeMillis()) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | tv_name.clickDelay { |
| | | toast("点亮网约") |
| | | } |
| | | |
| | | tv_car_num.clickDelay { |
| | |
| | | startActivity<SlabOrderListActivity>() |
| | | } |
| | | |
| | | |
| | | ll_task.clickDelay { |
| | | startActivity<SlabMineEventActivity>() |
| | | } |
| | | |
| | | tv_title_top.clickDelay { |
| | | |
| | | } |
| | | |
| | | view_mode.clickDelay { |
| | |
| | | CacheKey.putKeyStr("date_mode", System.currentTimeMillis().toString()) |
| | | CacheKey.putKeyStr("mode_now_time", "1")//记录为点击切换的颜色 1 白色 2 黑色 |
| | | setBlackMode(false) |
| | | mainFragment.adapter.notifyDataSetChanged() |
| | | } else { |
| | | CacheKey.putKeyStr("date_mode", System.currentTimeMillis().toString()) |
| | | CacheKey.putKeyStr("mode_now_time", "2") |
| | | setBlackMode(true) |
| | | mainFragment.adapter.notifyDataSetChanged() |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | override fun onLocationChanged(p0: AMapLocation?) { |
| | | if (p0 == null) { |
| | | toast("高德位置是空的") |
| | | // toast("高德位置是空的") |
| | | return |
| | | } |
| | | if (p0.errorCode == 0) { |
| | | toast("定位成功") |
| | | // toast("定位成功") |
| | | MyApplication.aMapLocation = p0 |
| | | CacheKey.putKeyStr("location", Gson().toJson(p0)) |
| | | } else { |
| | | p0.let { |
| | | toast("定位失败" + it.errorCode.toString()) |
| | | // toast("定位失败" + it.errorCode.toString()) |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | } else { |
| | | toast("已经是最新版本") |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private fun callLogin(ok: () -> Unit) { |
| | | var jobNum = CacheKey.getKeyStr("jobNum") |