From 1b6d5116f9f3e291da636b9ec510d65a4fedf639 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 16 四月 2024 17:19:22 +0800
Subject: [PATCH] 登录布防修改,logo修改

---
 HDL_ON/UI/UI1-Login/LoginPageBLL.cs |  144 +++++++++++++++++------------------------------
 1 files changed, 53 insertions(+), 91 deletions(-)

diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index 90e8660..4d8ac68 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -86,9 +86,6 @@
                         btnAccountViewBottomLine.Height = Application.GetRealHeight(2);
                         return;
                     }
-#if __IOS__
-                    etPassword.Foucs = true;
-#endif
                     //鍔犺浇Loading鏁堟灉
                     var waitPage = new Loading();
                     bodyView.AddChidren(waitPage);
@@ -230,9 +227,6 @@
                     }
                     //楠岃瘉鐮佷笉闇�瑕侀殣钘�
                     etPassword.SecureTextEntry = false;
-#if __IOS__
-                    etPassword.SetTextContentTypeToOneTimeCode();
-#endif
                 }
                 #endregion
             }
@@ -321,7 +315,6 @@
                 //}
                 //闅愯棌瀵嗙爜
                 etPassword.SecureTextEntry = true;
-                //etPassword.IsNumberKeyboardType = false;
             }
             //楠岃瘉鐮佺櫥褰�
             else if (logintMode == 1)
@@ -349,9 +342,6 @@
                 }
                 //楠岃瘉鐮佷笉闇�瑕侀殣钘�
                 etPassword.SecureTextEntry = false;
-                etPassword.Text = smsCode;
-                //etPassword.IsNumberKeyboardType = true;
-
             }
         }
 
@@ -402,7 +392,7 @@
                         {
                             var tip = new Tip()
                             {
-                                MaxWidth = Application.GetRealWidth(300),
+                            MaxWidth = Application.GetRealWidth(300),
                                 Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
                                 CloseTime = 1,
                                 Direction = AMPopTipDirection.None
@@ -426,7 +416,7 @@
                         {
                             var tip = new Tip()
                             {
-                                MaxWidth = Application.GetRealWidth(300),
+                            MaxWidth = Application.GetRealWidth(300),
                                 Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
                                 CloseTime = 1,
                                 Direction = AMPopTipDirection.None
@@ -445,27 +435,9 @@
                 {
                     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);
                 }
@@ -480,8 +452,12 @@
             etPassword.EditorEnterAction += (obj) =>
             {
                 Application.HideSoftInput();
-                LoginEvent();
             };
+            etPassword.MouseUpEventHandler = (sender, e) =>
+            {
+                etPassword.Foucs = true;
+            };
+
         }
 
         /// <summary>
@@ -510,7 +486,49 @@
         {
             btnLogin.MouseUpEventHandler += (sender, e) =>
             {
-                LoginEvent();
+                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);
+                }
             };
             #region 褰撹处鍙峰瘑鐮侀兘杈撳叆鏃讹紝鎵嶈兘鐐瑰嚮鐧诲綍鎸夐挳
             etAccount.TextChangeEventHandler = (sender, e) =>
@@ -548,58 +566,7 @@
             };
             #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>
@@ -730,11 +697,6 @@
                 //璋冪敤楠岃瘉鐮佺櫥褰曟帴鍙�
                 loginResult = pm.LoginValidCode(account, password);
             }
-            if(loginResult == null)
-            {
-
-                return false;
-            }
             if (loginResult.Code == StateCode.SUCCESS)
             {
                 var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(loginResult.Data.ToString());
@@ -771,9 +733,9 @@
                 UserInfo.Current.SaveUserInfo();
                 MainPage.Log("鐧诲綍鎴愬姛銆�");
 #if __IOS__
-                var sdm = new SiriKit.SceneDateManager();
-                sdm.AccessToken = UserInfo.Current.LoginTokenString;
-                sdm.RefreshToken = UserInfo.Current.RefreshToken;
+                //var sdm = new SiriKit.SceneDateManager();
+                //sdm.AccessToken = UserInfo.Current.LoginTokenString;
+                //sdm.RefreshToken = UserInfo.Current.RefreshToken;
 #endif
 
                 result = true;

--
Gitblit v1.8.0