| | |
| | | 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) |