wxr
2020-08-11 2bec9c838d2d688025698de8ec1de401ffd7dd1f
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/VerificationCodePage.cs
@@ -34,16 +34,22 @@
        Action<string> action;
        int titleId;
        /// <summary>
        /// 操作目标类型 1:邮箱,2:手机
        /// </summary>
        int optionType;
        public VerificationCodePage()
        {
            bodyView = this;
        }
        public void LoadPage(Action<string> act,int tId)
        public void LoadPage(Action<string> act,int tId,int ot)
        {
            action = act;
            titleId = tId;
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            optionType = ot;
            new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView();
            Button btnTip = new Button()
@@ -75,9 +81,10 @@
                X = Application.GetRealWidth(24),
                Y = btnNum1.Bottom,
                Width = Application.GetRealWidth(48),
                Height = Application.GetRealHeight(1),
                Height = Application.GetRealHeight(2),
                BackgroundColor = CSS_Color.PromptingColor2,
                SelectedBackgroundColor = CSS_Color.MainColor,
                IsSelected = true
            };
            bodyView.AddChidren(btnNum1Line);
@@ -361,6 +368,12 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum1Line.Text = "";
                        btnNum2Line.Text = "";
                        btnNum3Line.Text = "";
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        break;
                    case 1:
                        btnNum2Line.IsSelected = true;
@@ -376,6 +389,11 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum2Line.Text = "";
                        btnNum3Line.Text = "";
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        break;
                    case 2:
                        btnNum3Line.IsSelected = true;
@@ -391,6 +409,10 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum3Line.Text = "";
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        break;
                    case 3:
                        btnNum4Line.IsSelected = true;
@@ -406,6 +428,9 @@
                        btnNum4Line.Height = Application.GetRealHeight(2);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum4Line.Text = "";
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        break;
                    case 4:
                        btnNum5Line.IsSelected = true;
@@ -421,6 +446,8 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(2);
                        btnNum6Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Text = "";
                        btnNum6Line.Text = "";
                        break;
                    case 5:
                        btnNum6Line.IsSelected = true;
@@ -436,6 +463,7 @@
                        btnNum4Line.Height = Application.GetRealHeight(1);
                        btnNum5Line.Height = Application.GetRealHeight(1);
                        btnNum6Line.Height = Application.GetRealHeight(2);
                        btnNum6Line.Text = "";
                        break;
                    case 6:
                        btnNum6.Text = etCode.Substring(5, 1);
@@ -519,7 +547,6 @@
                                                    for (int i = 0; i < 2; i++)
                                                    {
                                                        MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                                                        //MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1);
                                                    }
                                                    action(account);
                                                });
@@ -539,6 +566,44 @@
                                        })
                                        { IsBackground = true }.Start();
                                    }
                                    else if (titleId == StringId.UnbindPhone)
                                    {
                                        var account = "";
                                        new Thread(() =>
                                        {
                                            var result2 = new DAL.Server.HttpServerRequest().BindAccount(account);
                                            if (result2 == "SUCCESS")
                                            {
                                                Application.RunOnMainThread(() =>
                                                {
                                                    MainPage.LoginUser.userEmailInfo = account;
                                                    var page = new OperationResultDisPalyPage();
                                                    page.Show();
                                                    page.LoadPage(true, Language.StringByID(StringId.UnbindPhone), Language.StringByID(StringId.UnbindPhoneSuccess), "");
                                                    for (int i = 0; i < 2; i++)
                                                    {
                                                        MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
                                                    }
                                                    action(account);
                                                });
                                            }
                                            else
                                            {
                                                Application.RunOnMainThread(() =>
                                                {
                                                    new Tip()
                                                    {
                                                        CloseTime = 3,
                                                        Direction = AMPopTipDirection.None,
                                                        Text = Language.StringByID(StringId.OperationFailed),
                                                    }.Show(bodyView);
                                                });
                                            }
                                        })
                                        { IsBackground = true }.Start();
                                    }
                                });
                            }
                        })
@@ -555,6 +620,18 @@
        {
            btnResend.IsSelected = false;
            int time = 60;
            new Thread(() =>
            {
                if (optionType == 1)
                {
                    var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userEmailInfo);
                }
                else if (optionType == 2)
                {
                    var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userMobileInfo);
                }
            })
            { IsBackground = true }.Start();
            new Thread(() =>
            {
                while (time > 0)
@@ -584,7 +661,7 @@
            };
        }
        /// <summary>
        /// 跳转绑定账号邮箱事件
        /// 跳转绑定账号信息事件
        /// </summary>
        void LoadEvent_SkipBindAccountInfoPage(int skipTid)
        {