| | |
| | |
|
| | | var rowPhone = new FrameRowControl();
|
| | | //右边偏移量->增加宽度
|
| | | rowPhone.RightOffset = -ControlCommonResourse.XXLeft;
|
| | | rowPhone.RightOffset = -HdlControlResourse.XXLeft;
|
| | | rowPhone.Y = Application.GetRealHeight(23);
|
| | | rowPhone.Width = this.GetPictrueRealSize(628);
|
| | | bodyFrameLayout.AddChidren(rowPhone);
|
| | | //请输入邮箱或手机号
|
| | | string phoneValue = string.IsNullOrEmpty(UserCenterResourse.UserInfo.Phone) == true ? string.Empty : "+" + UserCenterResourse.UserInfo.AreaCode + " " + UserCenterResourse.UserInfo.Phone;
|
| | | var txtPhone = rowPhone.AddLeftCaption(string.IsNullOrEmpty(phoneValue) == true ? UserCenterResourse.UserInfo.Email : phoneValue, 600);
|
| | | string phoneValue = string.IsNullOrEmpty(HdlUserCenterResourse.UserInfo.UserPhone) == true ? string.Empty : "+" + HdlUserCenterResourse.UserInfo.PhoneAreaCode + " " + HdlUserCenterResourse.UserInfo.UserPhone;
|
| | | var txtPhone = rowPhone.AddLeftCaption(string.IsNullOrEmpty(phoneValue) == true ? HdlUserCenterResourse.UserInfo.UserEmail : phoneValue, 600);
|
| | | txtPhone.TextColor = UserCenterColor.Current.TextGrayColor2;
|
| | | //底线
|
| | | rowPhone.AddBottomLine();
|
| | |
| | |
|
| | | //错误信息控件
|
| | | btnMsgControl = new NormalViewControl(800, 58, true);
|
| | | btnMsgControl.X = ControlCommonResourse.XXLeft;
|
| | | btnMsgControl.X = HdlControlResourse.XXLeft;
|
| | | btnMsgControl.Y = rowCode.Bottom + Application.GetRealHeight(46);
|
| | | btnMsgControl.TextColor = 0xfff75858;
|
| | | btnMsgControl.TextID = R.MyInternationalizationString.uVerificationCodeErrorInputAgain;
|
| | | bodyFrameLayout.AddChidren(btnMsgControl);
|
| | | btnMsgControl.Visible = false;
|
| | |
|
| | | if (string.IsNullOrEmpty(UserCenterResourse.UserInfo.Phone) == true
|
| | | || string.IsNullOrEmpty(UserCenterResourse.UserInfo.Email) == true)
|
| | | if (string.IsNullOrEmpty(HdlUserCenterResourse.UserInfo.UserPhone) == true
|
| | | || string.IsNullOrEmpty(HdlUserCenterResourse.UserInfo.UserEmail) == true)
|
| | | {
|
| | | rowPhone.UseClickStatu = false;
|
| | | return;
|
| | |
| | | frameTran.Visible = false;
|
| | | };
|
| | | var frameList = new FrameLayout();
|
| | | frameList.X = ControlCommonResourse.XXLeft - Application.GetRealWidth(17);
|
| | | frameList.Y = rowPhone.Bottom - ControlCommonResourse.BottomLineHeight - 1;
|
| | | frameList.X = HdlControlResourse.XXLeft - Application.GetRealWidth(17);
|
| | | frameList.Y = rowPhone.Bottom - HdlControlResourse.BottomLineHeight - 1;
|
| | | frameList.Width = this.GetPictrueRealSize(628);
|
| | | frameList.Height = this.GetPictrueRealSize(176);
|
| | | frameTran.AddChidren(frameList);
|
| | |
| | | btnEmail.X = this.GetPictrueRealSize(46);
|
| | | btnEmail.Y = this.GetPictrueRealSize(32);
|
| | | btnEmail.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnEmail.Text = UserCenterResourse.UserInfo.Email;
|
| | | btnEmail.Text = HdlUserCenterResourse.UserInfo.UserEmail;
|
| | | frameAnimate.AddChidren(btnEmail);
|
| | | frameAnimate.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
| | | /// <param name="btnCode"></param>
|
| | | private void SetVerificationCode(NormalViewControl btnCode)
|
| | | {
|
| | | string account = this.strPhoneEmail.StartsWith("+") == true ? UserCenterResourse.UserInfo.Phone : UserCenterResourse.UserInfo.Email;
|
| | | var sendCodePra = new SendCodePra();
|
| | | sendCodePra.Account = account;
|
| | | sendCodePra.AreaCode = Convert.ToInt32(UserCenterResourse.UserInfo.AreaCode);
|
| | | bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ForgetPassword", false, sendCodePra);
|
| | | if (flage == false)
|
| | | var errorMsg = string.Empty;
|
| | | if (this.strPhoneEmail.StartsWith("+") == true)
|
| | | {
|
| | | //手机
|
| | | errorMsg = HdlAccountLogic.Current.SendVeriCodeToPhone(HdlUserCenterResourse.UserInfo.PhoneAreaCode, HdlUserCenterResourse.UserInfo.UserPhone, VerCodeType.A其他);
|
| | | }
|
| | | else
|
| | | {
|
| | | //邮箱
|
| | | errorMsg = HdlAccountLogic.Current.SendVeriCodeToEmail(HdlUserCenterResourse.UserInfo.UserEmail, VerCodeType.A其他);
|
| | | }
|
| | | if (errorMsg != null)
|
| | | {
|
| | | this.ShowMassage(ShowMsgType.Tip, errorMsg);
|
| | | return;
|
| | | }
|
| | |
|
| | | |
| | | //可以开始校验验证码了
|
| | | this.canCheckCode = true;
|
| | | //控件不能再次按下
|
| | |
| | | /// <returns></returns>
|
| | | private void CheckVerificationCode(TextInputControl txtCode, string code)
|
| | | {
|
| | | string account = this.strPhoneEmail.StartsWith("+") == true ? UserCenterResourse.UserInfo.Phone : UserCenterResourse.UserInfo.Email;
|
| | | var checkCodePra = new CheckCodePra();
|
| | | checkCodePra.Code = code;
|
| | | checkCodePra.Account = account;
|
| | |
|
| | | bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
|
| | | if (flage == false)
|
| | | string account = this.strPhoneEmail.StartsWith("+") == true ? HdlUserCenterResourse.UserInfo.UserPhone : HdlUserCenterResourse.UserInfo.UserEmail;
|
| | | var result = HdlAccountLogic.Current.CheckVeriCode(account, VerCodeType.A其他, code);
|
| | | if (result == false)
|
| | | {
|
| | | //验证码错误,请重新输入
|
| | | this.btnMsgControl.Visible = true;
|
| | |
| | | //指定新建密码模式
|
| | | this.LoadFormMethodByName("EditorSecondaryPasswordForm", "SetNewPasswordFormMode");
|
| | | this.LoadFormMethodByName("EditorGesturePasswordForm", "SetNewPasswordFormMode");
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 结构体_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 发送验证码的启动参数
|
| | | /// </summary>
|
| | | private class SendCodePra
|
| | | {
|
| | | /// <summary>
|
| | | /// 用户账号
|
| | | /// </summary>
|
| | | public string Account = UserCenterResourse.UserInfo.Phone;
|
| | | /// <summary>
|
| | | /// 公司编号,国内使用手机短信验证码时,此字段填入0,国外手机短信验证码,此字段填入4 |
| | | /// </summary>
|
| | | public int Company = Common.CommonPage.PhoneZoneStr == "86" ? 0 : 4;
|
| | | /// <summary>
|
| | | /// 语言
|
| | | /// </summary>
|
| | | public string Language = Shared.Language.CurrentLanguage;
|
| | | /// <summary>
|
| | | /// 国家地区代码,手机号发送验证码时使用
|
| | | /// </summary>
|
| | | public int AreaCode = 0;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 发送验证码的启动参数
|
| | | /// </summary>
|
| | | private class CheckCodePra
|
| | | {
|
| | | /// <summary>
|
| | | /// 用户账号
|
| | | /// </summary>
|
| | | public string Account = UserCenterResourse.UserInfo.Phone;
|
| | | /// <summary>
|
| | | /// 验证码
|
| | | /// </summary>
|
| | | public string Code = "0";
|
| | | /// <summary>
|
| | | /// 语言
|
| | | /// </summary>
|
| | | public string Language = Shared.Language.CurrentLanguage;
|
| | | /// <summary>
|
| | | /// 国家地区代码,手机号发送验证码时使用
|
| | | /// </summary>
|
| | | public int AreaCode = Convert.ToInt32(UserCenterResourse.UserInfo.AreaCode);
|
| | | }
|
| | |
|
| | | #endregion
|