| | |
| | | private MutableLiveData<String> againPassword = new MutableLiveData<>(); |
| | | private MutableLiveData<Boolean> passwordVisibility = new MutableLiveData<>(); |
| | | private MutableLiveData<Boolean> againPasswordVisibility = new MutableLiveData<>(); |
| | | private MutableLiveData<String> selectLoginBackgroundLiveData = new MutableLiveData<>();//背景图 |
| | | |
| | | private MutableLiveData<String> value = new MutableLiveData<>(); |
| | | public LoginActivityViewModel(@NonNull Application application) { |
| | |
| | | return; |
| | | } |
| | | if (captchaImageLiveData.getValue() != null){ |
| | | model.login(new LoginRequestBean(username.getValue(),password.getValue(),captchaImageLiveData.getValue().getValue(),captchaImageLiveData.getValue().getUuid())) |
| | | model.login(new LoginRequestBean(username.getValue(),password.getValue(),value.getValue(),captchaImageLiveData.getValue().getUuid())) |
| | | .compose(RxUtils.schedulersTransformer()) |
| | | .subscribe(new Observer<ResultData<LoginResponseBean>>() { |
| | | @Override |
| | |
| | | public void setValue(MutableLiveData<String> value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public MutableLiveData<String> getSelectLoginBackgroundLiveData() { |
| | | return selectLoginBackgroundLiveData; |
| | | } |
| | | |
| | | public void setSelectLoginBackgroundLiveData(MutableLiveData<String> selectLoginBackgroundLiveData) { |
| | | this.selectLoginBackgroundLiveData = selectLoginBackgroundLiveData; |
| | | } |
| | | } |