From bd428f23e1eb103c19ebbf1f0165f9e2e7b0a9d0 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 09 五月 2023 09:11:18 +0800
Subject: [PATCH] Merge branch 'Dev-Wxr' into Dev-Branch

---
 HDL_ON/UI/UI1-Login/LoginPageBLL.cs |  117 +++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 74 insertions(+), 43 deletions(-)

diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index 32a50b9..c540ce6 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -42,7 +42,6 @@
                     OnAppConfig.Instance.GlobalRegion = mGlobalRegionListObj;
                     OnAppConfig.Instance.SaveConfig();
                 }
-                OnAppConfig.Instance.RequestHttpsHost = @"https://bahrain-gateway.hdlcontrol.com";
             }
             catch { }
         }
@@ -61,6 +60,7 @@
                     {
                         var tip = new Tip()
                         {
+                            MaxWidth = Application.GetRealWidth(300),
                             Text = Language.StringByID(StringId.PlsEntryPhoneNumber),
                             CloseTime = 1,
                             Direction = AMPopTipDirection.None
@@ -75,6 +75,7 @@
                     {
                         var tip = new Tip()
                         {
+                            MaxWidth = Application.GetRealWidth(300),
                             Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
                             CloseTime = 1,
                             Direction = AMPopTipDirection.None
@@ -391,6 +392,7 @@
                         {
                             var tip = new Tip()
                             {
+                                MaxWidth = Application.GetRealWidth(300),
                                 Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
                                 CloseTime = 1,
                                 Direction = AMPopTipDirection.None
@@ -414,6 +416,7 @@
                         {
                             var tip = new Tip()
                             {
+                                MaxWidth = Application.GetRealWidth(300),
                                 Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
                                 CloseTime = 1,
                                 Direction = AMPopTipDirection.None
@@ -432,6 +435,16 @@
                 {
                     btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor;
                     btnPasswordViewBottomLine.Height = Application.GetRealHeight(2);
+                    new Thread(() => {
+                        for(var i = 0; i < 10; i++)
+                        {
+                            Application.RunOnMainThread(() =>
+                            {
+                                this.Y = 0-Application.GetRealHeight(10 * i);
+                            });
+                            Thread.Sleep(10);
+                        }
+                    }) { IsBackground = true }.Start();
                 }
                 else
                 {
@@ -448,9 +461,14 @@
             //褰撶劍鐐瑰湪瀵嗙爜鏂囨湰妗嗘椂锛岀偣鍑婚敭鐩樺洖鎾ゆ寜閿紝瑙﹀彂鐨勪簨浠�
             etPassword.EditorEnterAction += (obj) =>
             {
+                LoginEvent();
                 Application.HideSoftInput();
             };
             etPassword.MouseUpEventHandler = (sender, e) =>
+            {
+                etPassword.Foucs = true;
+            };
+            etPassword.MouseDownEventHandler = (sender, e) =>
             {
                 etPassword.Foucs = true;
             };
@@ -483,48 +501,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()
-                            {
-                                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) =>
@@ -562,7 +539,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>
@@ -719,6 +747,7 @@
                 UserInfo.Current.LastTime = DateTime.Now;
                 UserInfo.Current.ID = revertData.userId;
                 UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken;
+                UserInfo.Current.AccessToken = revertData.accessToken;
                 UserInfo.Current.RefreshToken = revertData.refreshToken;
                 UserInfo.Current.userName = revertData.name;
                 //UserInfo.Current.userMobileInfo = "";//閲嶇疆鐢ㄦ埛鎵嬫満
@@ -888,6 +917,8 @@
             {
                 //2020-12-22 澧炲姞鐐瑰嚮闅愯棌閿洏浜嬩欢
                 Application.HideSoftInput();
+                this.Y = 0;
+                
 
                 //鍒ゆ柇鏄惁鍚屾剰浜嗛殣绉佹斂绛�
                 if (CheckPrivacyPolicy() == false) return;

--
Gitblit v1.8.0