wjc
2025-04-09 87cd5df70918e6ba1af849c5f026d3719bfdb1ac
app/src/main/java/com/hdl/photovoltaic/ui/me/MeChangePasswordActivity.java
@@ -20,6 +20,7 @@
import com.hdl.photovoltaic.databinding.ActivityMeChangePasswordBinding;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlAccountLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
@@ -38,7 +39,8 @@
    @Override
    public void onBindView(Bundle savedInstanceState) {
       setStatusBarTranslucent();
        setStatusBarTranslucent();
        getWindow().setNavigationBarColor(getColor(R.color.text_FF000000));
        //初始化
        initView();
        //初始化界面监听器
@@ -128,6 +130,7 @@
            HdlAccountLogic.getInstance().updatePassword_B(oldPsw, newPsw, new CloudCallBeak<String>() {
                @Override
                public void onSuccess(String str) {
                    HdlLogLogic.print("B端更改个人密码退出登录--->", true);
//                    HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_login_pws_reset_succeeded), 0);
                    HDLLinkPMUser.getInstance().logout(0);
                }
@@ -142,7 +145,7 @@
            HdlAccountLogic.getInstance().updatePassword_C(oldPsw, newPsw, new CloudCallBeak<String>() {
                @Override
                public void onSuccess(String obj) {
                    HdlLogLogic.print("C端更改个人密码退出登录--->", true);
                    HDLLinkPMUser.getInstance().logout(0);
@@ -187,9 +190,9 @@
        String affirmPsw = viewBinding.meChangePasswordAffirmIc.mePswEt.getText().toString();
        boolean isEnabled = oldPsw.length() > 0 && newPsw.length() > 0 && affirmPsw.length() > 0;
        if (isEnabled) {
            viewBinding.homeAffirmTv.setTextColor(getColor(R.color.text_E6FFFFFF));
            viewBinding.homeAffirmTv.setTextColor(getColor(R.color.text_FFACACAC));
        } else {
            viewBinding.homeAffirmTv.setTextColor(getColor(R.color.text_66FFFFFF));
            viewBinding.homeAffirmTv.setTextColor(getColor(R.color.text_FF5B5B5B));
        }
        viewBinding.homeAffirmTv.setEnabled(isEnabled);
    }
@@ -204,16 +207,16 @@
     */
    private boolean isEditTextPassword(String oldPsw, String newPsw, String affirmPsw) {
        if (newPsw.length() < 6 || affirmPsw.length() < 6) {
            HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_login_least6), -1);
            HdlThreadLogic.tipFlashingBox(_mActivity, false, getString(R.string.home_login_least6), -1);
            return false;
        }
        if (!newPsw.equals(affirmPsw)) {
            //新密码和确认密码不一样
            HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_login_input_unlike_psw), -1);
            HdlThreadLogic.tipFlashingBox(_mActivity, false, getString(R.string.home_login_input_unlike_psw), -1);
            return false;
        }
        if (oldPsw.equals(newPsw)) {
            HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.home_old_password_not_new_password), -1);
            HdlThreadLogic.tipFlashingBox(_mActivity, false, getString(R.string.home_old_password_not_new_password), -1);
            return false;
        }
        return true;