wxr
2020-09-09 c3e1b733fc45bd9f0b88bfb560cfa87a270b079b
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/ChangeBindAccountPage.cs
@@ -1,6 +1,7 @@
using System;
using Shared;
using HDL_ON.UI.CSS;
using System.Threading;
namespace HDL_ON.UI
{
@@ -27,6 +28,15 @@
        {
            action = act;
            optionType = opt;
            string account;
            if (optionType == 0)
            {
                account = MainPage.LoginUser.userEmailInfo;
            }
            else
            {
                account = MainPage.LoginUser.userMobileInfo;
            }
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView();
@@ -123,6 +133,7 @@
            };
        }
        int time = 0;
        /// <summary>
        /// 点击获取验证码
        /// </summary>
@@ -130,7 +141,9 @@
        {
            button.MouseUpEventHandler = (sender, e) =>
            {
                new System.Threading.Thread(() =>
                if (button.Text == Language.StringByID(StringId.GetVerificationCode))
                {
                    new Thread(() =>
                {
                    if (optionType == 1)
                    {
@@ -142,24 +155,35 @@
                    }
                })
                { IsBackground = true }.Start();
                }
                if (time == 0)
                {
                    time = 60;
                    new Thread(() =>
                    {
                        while (time > 0)
                        {
                            time--;
                            Application.RunOnMainThread(() =>
                            {
                                button.Text = time.ToString() + "s";
                            });
                            Thread.Sleep(1000);
                        }
                        Application.RunOnMainThread(() =>
                        {
                            button.IsSelected = true;
                            button.TextID = StringId.GetVerificationCode;
                            button.BackgroundColor = CSS_Color.MainColor;
                            time = 0;
                        });
                    })
                    { IsBackground = true }.Start();
                }
                button.BackgroundColor = CSS_Color.PromptingColor1;
                var vcp = new VerificationCodePage();
                MainPage.BasePageView.AddChidren(vcp);
                //if (titleId == StringId.ModifyBindingEmail)
                //{
                //    vcp.LoadPage(action, StringId.ModifyBindingEmail);
                //}
                //else if (titleId == StringId.UnbindEmail)
                //{
                //    vcp.LoadPage(action, StringId.UnbindEmail);
                //}
                //else if(titleId == StringId.ModifyBindingPhone)
                //{
                //    vcp.LoadPage(action, StringId.ModifyBindingPhone);
                //}
                //else if(titleId == StringId.UnbindPhone)
                //{
                //}
                vcp.LoadPage(action, titleId,optionType);
                vcp.LoadPage(action, titleId, optionType, time);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }