| | |
| | | LoginCabinetParam param = new LoginCabinetParam(); |
| | | param.setUsername(userName); |
| | | param.setPassword(pw); |
| | | doAction(3); |
| | | doAction(6); |
| | | getRetrofitService(Apis.class).loginCabinet(ParamsUtil.encodeRequestBody(param)) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new SimpleObserver<BaseResponse<String>>(rxJavaGcManager) { |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse<String> response) { |
| | | if(200==response.getCode()){ |
| | | MApplication.setLoginBean(null); |
| | | MApplication.getLoginBean().setToken(response.getData()); |
| | | startActivity(ManageCabinetActivity.class); |
| | | MApplication.getLoginBean().setAuthType(2); |
| | | doAction(5); |
| | | }else { |
| | | doAction(4); |
| | | } |