From 351bdda734832d821a9764b0cde8be5d83c4ec50 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 01 十二月 2022 09:56:25 +0800
Subject: [PATCH] 2022年12月01日09:56:23

---
 ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
index 88a6757..d4beb21 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/CheckOldEmailForm.cs
@@ -86,7 +86,11 @@
             btnCodeControl.FinishInputEvent += (value) =>
             {
                 //鏍¢獙楠岃瘉鐮�
-                this.CheckVerificationCode(value);
+                if (this.CheckVerificationCode(value) == false)
+                {
+                    //娓呯┖楠岃瘉鐮�
+                    btnCodeControl.ClearInputValue();
+                }
             };
 
             //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
@@ -120,11 +124,11 @@
         /// <summary>
         /// 鍙戦�侀獙璇佺爜鍒伴偖绠�
         /// </summary>
-        private async void SendCodeToEmail(BottomClickButton btnNext)
+        private void SendCodeToEmail(BottomClickButton btnNext)
         {
             var sendCodePra = new SendCodePra();
 
-            bool falge = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
+            bool falge = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/LoginSendVerCode", false, sendCodePra);
             if (falge == false)
             {
                 return;
@@ -148,7 +152,7 @@
                     System.Threading.Thread.Sleep(1000);
                     if (waitime == 0)
                     {
-                        Application.RunOnMainThread(() =>
+                        HdlThreadLogic.Current.RunMain(() =>
                         {
                             if (btnNext != null)
                             {
@@ -160,13 +164,13 @@
                         });
                         break;
                     }
-                    Application.RunOnMainThread(() =>
+                    HdlThreadLogic.Current.RunMain(() =>
                     {
                         if (btnNext != null)
                         {
                             btnNext.Text = waitime + "s" + repeat;
                         }
-                    });
+                    }, ShowErrorMode.NO);
                 }
             });
         }
@@ -179,27 +183,29 @@
         /// 楠岃瘉楠岃瘉鐮�
         /// </summary>
         /// <returns></returns>
-        private async void CheckVerificationCode(string code)
+        private bool CheckVerificationCode(string code)
         {
             if (this.canCheckCode == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
                 this.btnErrorMsg.Visible = true;
-                return;
+                return false;
             }
             var checkCodePra = new CheckCodePra();
             checkCodePra.Code = code;
 
-            bool flage = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
+            bool flage = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/ValidatorCode", false, checkCodePra);
             if (flage == false)
             {
                 //楠岃瘉鐮侀敊璇紝璇烽噸鏂拌緭鍏�
                 this.btnErrorMsg.Visible = true;
-                return;
+                return false;
             }
 
             var from = new CheckNewEmailForm();
             base.AddFromAndRemoveNowForm(from);
+
+            return true;
         }
 
         #endregion

--
Gitblit v1.8.0