mac
2023-11-20 734babb3a7348050fdffe845c560ba8b0b218152
app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java
@@ -90,7 +90,7 @@
    private void initView() {
        switchPhoneOrMailView();
        switchPhoneOrEmailStyleView();
    }
    private void initEvent() {
@@ -111,6 +111,7 @@
                    public void HDLChina() {
                        mUrl = "https://china-gateway.hdlcontrol.com";
                        viewBinding.regionTv.setText(listDialog.geHDLChinaText());
                        listDialog.dismiss();
                    }
                });
@@ -119,6 +120,7 @@
                    public void HDLBahrain() {
                        mUrl = "https://bahrain-gateway.hdlcontrol.com";
                        viewBinding.regionTv.setText(listDialog.getHDLBahrainText());
                        listDialog.dismiss();
                    }
                });
            }
@@ -129,7 +131,7 @@
            public void onClick(View v) {
                isPhoneType = true;
                switchPhoneOrMailView();
                switchPhoneOrEmailStyleView();
            }
        });
        //切换邮箱
@@ -137,7 +139,7 @@
            @Override
            public void onClick(View v) {
                isPhoneType = false;
                switchPhoneOrMailView();
                switchPhoneOrEmailStyleView();
            }
        });
@@ -221,7 +223,7 @@
                } else {
                    verification_code = viewBinding.registerMailVerificationEt.getText().toString();
                }
                HdlAccountLogic.getInstance().registerAccount(isPhoneType, account, psw, verification_code, new CloudCallBeak<Boolean>() {
                HdlAccountLogic.getInstance().registerAccount_C(isPhoneType, account, psw, verification_code, new CloudCallBeak<Boolean>() {
                    @Override
                    public void onSuccess(Boolean obj) {
                        HdlThreadLogic.runMainThread(new Runnable() {
@@ -270,9 +272,8 @@
        HdlAccountLogic.getInstance().regionByAccount(account, new CloudCallBeak<HDLUserRegionBean>() {
            @Override
            public void onSuccess(HDLUserRegionBean obj) {
                //发送消息验证码
                HdlThreadLogic.toast(RegisterAccountActivity.this, getString(R.string.home_login_already_exists));
                HdlLogLogic.print("regionByAccount onSuccess==" + obj);
                HdlLogLogic.print("获取账号区域信息===" + obj, false);
            }
            @Override
@@ -317,7 +318,7 @@
            long time = (millisUntilFinished / 1000);
            String str = time + "s" + getString(R.string.home_login_psw_verification_repeater);
            viewBinding.registerPhoneVerificationTv.setText(str);
            viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000));
            viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000, null));
            viewBinding.registerPhoneVerificationTv.setEnabled(false);
        }
@@ -325,7 +326,7 @@
        @Override
        public void onFinish() {
            viewBinding.registerPhoneVerificationTv.setText(getString(R.string.home_login_verification_regain));
            viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3));
            viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3, null));
            viewBinding.registerPhoneVerificationTv.setEnabled(true);
@@ -341,7 +342,7 @@
            String str = time + "s" + getString(R.string.home_login_psw_verification_repeater);
            viewBinding.registerMailVerificationTv.setText(str);
            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000));
            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000, null));
            viewBinding.registerMailVerificationTv.setEnabled(false);
        }
@@ -349,7 +350,7 @@
        @Override
        public void onFinish() {
            viewBinding.registerMailVerificationTv.setText(getString(R.string.home_login_verification_regain));
            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3));
            viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3, null));
            viewBinding.registerMailVerificationTv.setEnabled(true);
        }
@@ -358,17 +359,17 @@
    /**
     * 切换手机号或者邮箱的样式
     */
    private void switchPhoneOrMailView() {
    private void switchPhoneOrEmailStyleView() {
        if (isPhoneType) {
            //手机号
            viewBinding.registerPhoneTitleIc.accountTitleTv.setText(R.string.home_login_phone);
            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextSize(20);
            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_90000000));
            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_90000000, null));
            viewBinding.registerPhoneTitleIc.lineV.setVisibility(View.VISIBLE);
            viewBinding.registerMailTitleIc.accountTitleTv.setText(R.string.home_login_email);
            viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(16);
            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_40000000));
            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_40000000, null));
            viewBinding.registerMailTitleIc.lineV.setVisibility(View.GONE);
            //输入手机号
@@ -393,12 +394,12 @@
            //邮箱
            viewBinding.registerPhoneTitleIc.accountTitleTv.setText(R.string.home_login_phone);
            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextSize(16);
            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_40000000));
            viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_40000000, null));
            viewBinding.registerPhoneTitleIc.lineV.setVisibility(View.GONE);
            viewBinding.registerMailTitleIc.accountTitleTv.setText(R.string.home_login_email);
            viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(20);
            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_90000000));
            viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_90000000, null));
            viewBinding.registerMailTitleIc.lineV.setVisibility(View.VISIBLE);
            //输入邮箱
            viewBinding.registerAccountEt.setInputType(InputType.TYPE_CLASS_TEXT);