| | |
| | | try { |
| | | Handler(Looper.getMainLooper()).post { |
| | | val b = intent.getBooleanExtra("isLogin",true) |
| | | toast("isLogin=$b") |
| | | if (!b){ |
| | | CacheUtil.get().clear() |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.OUT_APP)) |
| | |
| | | callNet(context!!,Api.loginByIdentification,map){ |
| | | toast("登录成功") |
| | | var bean = Gson().fromJson<LoginBean>(it, LoginBean::class.java) |
| | | CacheKey.putKeyStr("identification",driverCertificate!!) |
| | | CacheKey.putKeyStr("appid", bean.data.appid) |
| | | CacheKey.putKeyStr("token", bean.data.token) |
| | | CacheKey.putKeyStr("userId", bean.data.id.toString()) |