HDL_ON/UI/UI1-Login/ForgetPasswordPageBLL.cs
@@ -32,6 +32,12 @@
            {
                if (registerType == 0)
                    return;
                if (!string.IsNullOrEmpty(etAccount.Text.Trim()))
                {
                    //记录之前的邮箱
                    registerEmail = etAccount.Text.Trim();
                }
                etAccount.IsNumberKeyboardType = true;
                etAccount.Text = registerPhone;
                etPassword.Text = "";
@@ -61,7 +67,14 @@
            {
                if (registerType == 1)
                    return;
                if (!string.IsNullOrEmpty(etAccount.Text.Trim()))
                {
                    //记录之前的手机号
                    registerPhone = etAccount.Text.Trim();
                }
                etAccount.IsNumberKeyboardType = false;
                etAccount.SecureTextEntry = false;//2020-12-10 解决Android数字切换回路普通键盘变加密问题
                etAccount.Text = registerEmail;
                etPassword.Text = "";
                etRepeatPassword.Text = "";
@@ -120,7 +133,26 @@
                            btnGetVerificationCode_Mail.IsSelected = true;
                    }
                }
                LoadMothed_EnableResetButton();
            };
            //etVerificationCode.TextChangeEventHandler = (sender, e) => {
            //    if (etVerificationCode.Text.Length > 1)
            //    {
            //        LoadMothed_EnableResetButton();
            //    }
            //};
            Action<View, string> textChangeEventHandler = (view, textStr) =>
            {
                LoadMothed_EnableResetButton();
            };
            //etAccount.TextChangeEventHandler += textChangeEventHandler;
            etPassword.TextChangeEventHandler += textChangeEventHandler;
            etRepeatPassword.TextChangeEventHandler += textChangeEventHandler;
            etVerificationCode.TextChangeEventHandler += textChangeEventHandler;
        }
        /// <summary>
@@ -133,22 +165,22 @@
            {
                if (etAccount.Foucs)
                {
                    btnAccountViewBottomLine.BackgroundColor = CSS_Color.MainColor;
                    btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
                    HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.GotFocus);
                }
                else
                {
                    //标记手机号码无效
                    btnAccountViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
                    btnAccountViewBottomLine.Height = Application.GetRealHeight(1);
                    if (isHitBack) return;//点击返回关闭页面不检测提示
                    HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Normal);
                    if (etAccount.Text.Length == 0) return;//没输入不检测提示
                    //手机方式-验证手机号码是否正确
                    if (registerType == 0)
                    {
                        btnGetVerificationCode_Phone.IsSelected = false;
                        if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
                        {
                            btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                            btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
                            HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
                            new Tip()
                            {
                                CloseTime = 1,
@@ -171,8 +203,7 @@
                        //邮箱方式-验证邮箱是否正确
                        if (!Utlis.CheckEmail(etAccount.Text.Trim()))
                        {
                            btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                            btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
                            HDLCommon.Current.BottomLineShowType(btnAccountViewBottomLine, BottomLineType.Error);
                            new Tip()
                            {
                                CloseTime = 1,
@@ -197,16 +228,19 @@
            {
                if (etPassword.Foucs)
                {
                    btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
                    btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
                    HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.GotFocus);
                }
                else
                {
                    btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
                    btnPasswordViewBottomLine.Height = Application.GetRealHeight(1);
                    if (isHitBack) return;//点击返回关闭页面不检测提示
                    HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Normal);
                    if (etPassword.Text.Length == 0) return;//没输入不检测提示
                    //校验密码是否符合要求
                    if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
                    {
                        HDLCommon.Current.BottomLineShowType(btnPasswordViewBottomLine, BottomLineType.Error);
                        new Tip()
                        {
                            CloseTime = 1,
@@ -222,18 +256,17 @@
            {
                if (etRepeatPassword.Foucs)
                {
                    btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
                    btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2);
                    HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.GotFocus);
                }
                else
                {
                    btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
                    btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(1);
                    if (isHitBack) return;//点击返回关闭页面不检测提示
                    HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Normal);
                    //校验两次输入的密码是否一致
                    if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
                    {
                        btnRepeatPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                        btnRepeatPasswordViewBottomLine.Height = Application.GetRealHeight(2);
                        HDLCommon.Current.BottomLineShowType(btnRepeatPasswordViewBottomLine, BottomLineType.Error);
                        new Tip()
                        {
                            CloseTime = 1,
@@ -253,13 +286,13 @@
            {
                if (etVerificationCode.Foucs)
                {
                    btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.MainColor;
                    btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2);
                    HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.GotFocus);
                }
                else
                {
                    btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
                    btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(1);
                    if (isHitBack) return;//点击返回关闭页面不检测提示
                    HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Normal);
                    if (etVerificationCode.Text.Length > 4)
                    {
                        LoadMothed_EnableResetButton();
@@ -292,7 +325,8 @@
        /// 检测当前配置域名是否一致,不一致则替换
        /// </summary>
        /// <param name="result"></param>
        void CheckAndSetUserRequestHost(ResponsePackNew result) {
        void CheckAndSetUserRequestHost(ResponsePackNew result)
        {
            try
            {
                var mGlobalRegionListObj = Newtonsoft.Json.JsonConvert.DeserializeObject<GlobalRegionListRes>(result.Data.ToString());
@@ -419,6 +453,13 @@
            {
                if (btnReset.IsSelected)
                {
                    //检测账号
                    if (!CheckAccount()) return;
                    //检测密码
                    if (!CheckPassword()) return;
                    //检测验证码
                    if (!CheckVerificationCode()) return;
                    //创建修改密码线程
                    var loginThread = LoadMothed_ResetThread();
                    waitPage = new Loading();
@@ -472,8 +513,7 @@
                        // 验证码错误 警告提示
                        if (resultObj.Code == StateCode.VERIFICATION_CODE_WRONG)
                        {
                            btnVerificationCodeViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2;
                            btnVerificationCodeViewBottomLine.Height = Application.GetRealHeight(2);
                            HDLCommon.Current.BottomLineShowType(btnVerificationCodeViewBottomLine, BottomLineType.Error);
                        }
                    });
                    // 提示错误
@@ -498,6 +538,76 @@
        }
        /// <summary>
        /// 检测账号
        /// </summary>
        /// <returns></returns>
        bool CheckAccount()
        {
            //手机方式-验证手机号码是否正确
            if (registerType == 0)
            {
                if (!Utlis.CheckPhoneNumber(etAccount.Text.Trim(), phoneZoneCode))
                {
                    Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectMobilNeumber));
                }
                else
                {
                    return true;
                }
            }
            else if (registerType == 1)
            {
                //邮箱方式-验证邮箱是否正确
                if (!Utlis.CheckEmail(etAccount.Text.Trim()))
                {
                    Utlis.ShowTip(Language.StringByID(StringId.PlsEntryCorrectEmailAddress));
                }
                else
                {
                    return true;
                }
            }
            return false;
        }
        /// <summary>
        /// 检测密码是否正确
        /// </summary>
        /// <returns></returns>
        bool CheckPassword()
        {
            //校验密码是否符合要求
            if (etPassword.Text.Trim().Length < 6 || etPassword.Text.Trim().Length > 13)
            {
                Utlis.ShowTip(Language.StringByID(StringId.PasswordIsUnqualified));
                return false;
            }
            if (etPassword.Text.Trim() != etRepeatPassword.Text.Trim())
            {
                Utlis.ShowTip(Language.StringByID(StringId.IncorrectRepeatPassword));
                return false;
            }
            return true;
        }
        /// <summary>
        /// 检测验证码是否输入
        /// </summary>
        /// <returns></returns>
        bool CheckVerificationCode()
        {
            if (string.IsNullOrEmpty(etVerificationCode.Text))
            {
                Utlis.ShowTip(Language.StringByID(StringId.PlsEntryVerificationCode));
                return false;
            }
            return true;
        }
        /// <summary>
        /// 显示自动自动登录事件
        /// </summary>
        void ShowAutoLoginDialog(string account, string password, bool isPhone)