From cf2204a85fa951dd9ce2698378101d822e6edbc8 Mon Sep 17 00:00:00 2001
From: guoshen <3129367635@qq.com>
Date: 星期六, 06 七月 2024 10:31:02 +0800
Subject: [PATCH] 会议审批显示成功

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