Linjiajia
2023-07-25 82e57df230ecb744af6c8865f80870ba03c86d89
app/src/main/java/com/application/zhangshi_app_android/ui/login/LoginActivityViewModel.java
@@ -38,6 +38,7 @@
    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) {
@@ -92,7 +93,7 @@
            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
@@ -226,4 +227,12 @@
    public void setValue(MutableLiveData<String> value) {
        this.value = value;
    }
    public MutableLiveData<String> getSelectLoginBackgroundLiveData() {
        return selectLoginBackgroundLiveData;
    }
    public void setSelectLoginBackgroundLiveData(MutableLiveData<String> selectLoginBackgroundLiveData) {
        this.selectLoginBackgroundLiveData = selectLoginBackgroundLiveData;
    }
}