From e6014ef123350d5c0cadabe9c18e26b3d5a3c729 Mon Sep 17 00:00:00 2001
From: guoshen <3129367635@qq.com>
Date: 星期六, 29 六月 2024 15:41:25 +0800
Subject: [PATCH] Revert "Initial commit"
---
app/src/main/java/com/application/zhangshi_app_android/ui/login/LoginActivityViewModel.java | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/com/application/zhangshi_app_android/ui/login/LoginActivityViewModel.java b/app/src/main/java/com/application/zhangshi_app_android/ui/login/LoginActivityViewModel.java
index 74b66c9..ed4edcc 100644
--- a/app/src/main/java/com/application/zhangshi_app_android/ui/login/LoginActivityViewModel.java
+++ b/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
@@ -105,8 +106,9 @@
if (loginResponseBeanResultData.getCode() == CODE_SUCCESS){
String token = loginResponseBeanResultData.getData().getToken();
UserManager.getInstance().setToken(token);
- ToastUtils.showShort("鐧婚檰鎴愬姛");
AppManager.getAppManager().startActivity(MainActivity.class);
+ AppManager.getAppManager().finishCurrentActivity();
+ ToastUtils.showShort("鐧婚檰鎴愬姛");
}else {
changeStateView(StateViewEnum.DATA_ERROR);
messageLiveData.postValue(loginResponseBeanResultData.getMsg());
@@ -226,4 +228,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;
+ }
}
--
Gitblit v1.9.1