From adc150efb13a0506f45a3c344c3ee2ef2dba8e90 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 七月 2021 15:19:13 +0800 Subject: [PATCH] 合并嘉乐lc代码 --- HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs | 101 ++++++++++++++++++++++++++++++-------------------- 1 files changed, 60 insertions(+), 41 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs index 8362af1..2a3a276 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/NewBindAccountPage.cs @@ -280,63 +280,82 @@ } } #endregion + //鍔犺浇Loading鏁堟灉 + var waitPage = new Loading(); + bodyView.AddChidren(waitPage); + waitPage.Start(Language.StringByID(StringId.PleaseWait)); + int time = 0; //2.妫�楠岄�氳繃 new Thread(() => { - //2.2 鑾峰彇楠岃瘉鐮� - ResponsePackNew resultObj; - if (!isPhone)//閭 + try { - resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account); - } - else - { - resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account, true, phoneZoneCode); - } - - if (resultObj.Code != StateCode.SUCCESS) - { - // 鎻愮ず閿欒 - IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); - } - else - { - if (time == 0) + //2.2 鑾峰彇楠岃瘉鐮� + ResponsePackNew resultObj; + if (!isPhone)//閭 { - time = 60; - new Thread(() => + resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account); + } + else + { + resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, account, true, phoneZoneCode); + } + + if (resultObj.Code != StateCode.SUCCESS) + { + // 鎻愮ず閿欒 + IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); + } + else + { + if (time == 0) { - while (time > 0) + time = 60; + new Thread(() => { - time--; + while (time > 0) + { + time--; + Application.RunOnMainThread(() => + { + button.Text = time.ToString() + "s"; + }); + Thread.Sleep(1000); + } Application.RunOnMainThread(() => { - button.Text = time.ToString() + "s"; + button.IsSelected = true; + button.TextID = StringId.GetVerificationCode; + button.BackgroundColor = CSS_Color.MainColor; + time = 0; }); - Thread.Sleep(1000); - } - Application.RunOnMainThread(() => - { - button.IsSelected = true; - button.TextID = StringId.GetVerificationCode; - button.BackgroundColor = CSS_Color.MainColor; - time = 0; - }); - }) - { IsBackground = true }.Start(); + }) + { IsBackground = true }.Start(); + } + Application.RunOnMainThread(() => + { + button.BackgroundColor = CSS_Color.PromptingColor1; + var vcp = new NewBindVerificationCodePage(); + vcp.PhoneZoneCode = phoneZoneCode; + MainPage.BasePageView.AddChidren(vcp); + vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }); } + } + catch { } + finally + { Application.RunOnMainThread(() => { - button.BackgroundColor = CSS_Color.PromptingColor1; - var vcp = new NewBindVerificationCodePage(); - vcp.PhoneZoneCode = phoneZoneCode; - MainPage.BasePageView.AddChidren(vcp); - vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } }); } - }) { IsBackground = true }.Start(); } -- Gitblit v1.8.0