From a19e58425e44c8a83c3d1b23de292659c38a6b1e Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 05 六月 2023 14:09:20 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' into wjc

---
 HDL_ON/UI/UI1-Login/LoginPageBLL.cs |  129 +++++++++++++++++++++++++++----------------
 1 files changed, 81 insertions(+), 48 deletions(-)

diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index e2fbe02..13fc4ad 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -86,6 +86,9 @@
                         btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
                         return;
                     }
+#if __IOS__
+                    etPassword.Foucs = true;
+#endif
                     //鍔犺浇Loading鏁堟灉
                     var waitPage = new Loading();
                     bodyView.AddChidren(waitPage);
@@ -227,6 +230,9 @@
                     }
                     //楠岃瘉鐮佷笉闇�瑕侀殣钘�
                     etPassword.SecureTextEntry = false;
+#if __IOS__
+                    etPassword.SetTextContentTypeToOneTimeCode();
+#endif
                 }
                 #endregion
             }
@@ -315,6 +321,7 @@
                 //}
                 //闅愯棌瀵嗙爜
                 etPassword.SecureTextEntry = true;
+                //etPassword.IsNumberKeyboardType = false;
             }
             //楠岃瘉鐮佺櫥褰�
             else if (logintMode == 1)
@@ -342,6 +349,9 @@
                 }
                 //楠岃瘉鐮佷笉闇�瑕侀殣钘�
                 etPassword.SecureTextEntry = false;
+                etPassword.Text = smsCode;
+                //etPassword.IsNumberKeyboardType = true;
+
             }
         }
 
@@ -435,9 +445,27 @@
                 {
                     btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
                     btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+
+#if __IOS__
+      new Thread(() => {
+                            for(var i = 0; i < 10; i++)
+                            {
+                                Application.RunOnMainThread(() =>
+                                {
+                                    this.Y = 0-Application.GetRealHeight(10 * i);
+                                });
+                                Thread.Sleep(10);
+                            }
+                        }) { IsBackground = true }.Start();
+
+                    var sst = etPassword.MyTextContentType;
+                    Console.WriteLine(sst);
+                    etPassword.SetTextContentTypeToOneTimeCode();
+#endif
                 }
                 else
                 {
+                    this.Y = 0;
                     btnPasswordViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
                     btnPasswordViewBottomLine.Height = Application.GetRealHeight(1);
                 }
@@ -451,13 +479,9 @@
             //褰撶劍鐐瑰湪瀵嗙爜鏂囨湰妗嗘椂锛岀偣鍑婚敭鐩樺洖鎾ゆ寜閿紝瑙﹀彂鐨勪簨浠�
             etPassword.EditorEnterAction += (obj) =>
             {
+                LoginEvent();
                 Application.HideSoftInput();
             };
-            etPassword.MouseUpEventHandler = (sender, e) =>
-            {
-                etPassword.Foucs = true;
-            };
-
         }
 
         /// <summary>
@@ -486,49 +510,7 @@
         {
             btnLogin.MouseUpEventHandler += (sender, e) =>
             {
-                if (btnLogin.IsSelected)
-                {
-                    //鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
-                    if (CheckPrivacyPolicy() == false) return;
-
-                    account = etAccount.Text.Trim();
-                    password = etPassword.Text.Trim();
-
-                    if (loginType == 0)
-                    {
-                        if (!Utlis.CheckPhoneNumber(account, phoneZoneCode))
-                        {
-                            var tip = new Tip()
-                            {
-                                MaxWidth = Application.GetRealWidth(300),
-                                Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
-                                CloseTime = 1,
-                                Direction = AMPopTipDirection.None
-                            };
-                            tip.Show(bodyView);
-                            return;
-                        }
-                    }
-                    else
-                    {
-                        if (!Utlis.CheckEmail(account))
-                        {
-                            var tip = new Tip()
-                            {
-                                Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
-                                CloseTime = 1,
-                                Direction = AMPopTipDirection.None
-                            };
-                            tip.Show(bodyView);
-                            return;
-                        }
-                    }
-
-                    //鍒涘缓鐧诲綍绾跨▼
-                    var loginThread = LoadThread_Login();
-                    waitPage = new Loading();
-                    new PublicAssmebly().LoadPage_WaitPage(loginThread, bodyView, waitPage);
-                }
+                LoginEvent();
             };
             #region 褰撹处鍙峰瘑鐮侀兘杈撳叆鏃讹紝鎵嶈兘鐐瑰嚮鐧诲綍鎸夐挳
             etAccount.TextChangeEventHandler = (sender, e) =>
@@ -566,7 +548,58 @@
             };
             #endregion
         }
+        /// <summary>
+        /// 鐧诲綍浜嬩欢
+        /// </summary>
+        void LoginEvent()
+        {
+            if (btnLogin.IsSelected)
+            {
+                //鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
+                if (CheckPrivacyPolicy() == false)
+                {
+                    Application.HideSoftInput();
+                    return;
+                }
+                account = etAccount.Text.Trim();
+                password = etPassword.Text.Trim();
 
+                if (loginType == 0)
+                {
+                    if (!Utlis.CheckPhoneNumber(account, phoneZoneCode))
+                    {
+                        var tip = new Tip()
+                        {
+                            MaxWidth = Application.GetRealWidth(300),
+                            Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
+                            CloseTime = 1,
+                            Direction = AMPopTipDirection.None
+                        };
+                        tip.Show(bodyView);
+                        return;
+                    }
+                }
+                else
+                {
+                    if (!Utlis.CheckEmail(account))
+                    {
+                        var tip = new Tip()
+                        {
+                            Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
+                            CloseTime = 1,
+                            Direction = AMPopTipDirection.None
+                        };
+                        tip.Show(bodyView);
+                        return;
+                    }
+                }
+
+                //鍒涘缓鐧诲綍绾跨▼
+                var loginThread = LoadThread_Login();
+                waitPage = new Loading();
+                new PublicAssmebly().LoadPage_WaitPage(loginThread, bodyView, waitPage);
+            }
+        }
         /// <summary>
         /// 鍔犺浇鐧诲綍绾跨▼
         /// </summary>

--
Gitblit v1.8.0