From af1cb3ecd0f4b0589e00b28f7f9edccf39e6e12b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 10 九月 2020 16:15:11 +0800
Subject: [PATCH] 202009101

---
 HDL_ON/UI/UI1-Login/LoginPageBLL.cs |   60 +++++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index 3a47a85..10c3df6 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -41,7 +41,7 @@
                         var tip = new Tip()
                         {
                             Text = Language.StringByID(StringId.PlsEntryPhoneNumber),
-                            CloseTime = 3,
+                            CloseTime = 1,
                             Direction = AMPopTipDirection.None
                         };
                         tip.Show(bodyView);
@@ -55,7 +55,7 @@
                         var tip = new Tip()
                         {
                             Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
-                            CloseTime = 3,
+                            CloseTime = 1,
                             Direction = AMPopTipDirection.None
                         };
                         tip.Show(bodyView);
@@ -88,7 +88,7 @@
                     new Thread(() =>
                     {
                         //鑾峰彇楠岃瘉鐮�
-                        var result = pm.GetPhoneLoginVerCode(phoneNumber);
+                        var result = pm.GetLoginVerCode(phoneNumber);
                         if (result.StateCode.ToUpper() == "SUCCESS")
                         {
                         }
@@ -132,7 +132,7 @@
                                 var tip = new Tip()
                                 {
                                     Text = tipStr,
-                                    CloseTime = 3,
+                                    CloseTime = 1,
                                     Direction = AMPopTipDirection.None
                                 };
                                 tip.Show(bodyView);
@@ -154,6 +154,8 @@
             {
                 if (loginType == 0)
                     return;
+                etAccount.Text = registerPhone;
+                etPassword.Text = "";
                 #region 鍒囨崲閫変腑鎸夐挳
                 btnEmailLogin.TextColor = CSS_Color.PromptingColor1;
                 btnEmailLogin.TextSize = CSS_FontSize.TextFontSize;
@@ -209,6 +211,8 @@
             {
                 if (loginType == 1)
                     return;
+                etAccount.Text = registerEmail;
+                etPassword.Text = "";
                 #region 鍒囨崲閫変腑鎸夐挳
                 btnPhoneLogin.TextColor = CSS_Color.PromptingColor1;
                 btnPhoneLogin.TextSize = CSS_FontSize.TextFontSize;
@@ -323,6 +327,14 @@
                     btnAccountViewBottomLine.BackgroundColor = CSS_Color.DividingLineColor;
                     btnAccountViewBottomLine.Height = Application.GetRealHeight(1);
                     account = etAccount.Text.Trim();
+                    if (loginType == 0)
+                    {
+                        registerPhone = account;
+                    }
+                    else
+                    {
+                        registerEmail = account;
+                    }
                     if (account.Length == 0)
                         return;
                     if (loginType == 0)
@@ -332,7 +344,7 @@
                             var tip = new Tip()
                             {
                                 Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
-                                CloseTime = 3,
+                                CloseTime = 1,
                                 Direction = AMPopTipDirection.None
                             };
                             tip.Show(bodyView);
@@ -355,7 +367,7 @@
                             var tip = new Tip()
                             {
                                 Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
-                                CloseTime = 3,
+                                CloseTime = 1,
                                 Direction = AMPopTipDirection.None
                             };
                             tip.Show(bodyView);
@@ -366,7 +378,7 @@
                 }
             };
             //褰撶劍鐐瑰湪瀵嗙爜鏂囨湰妗嗘椂锛屾枃鏈搴曠嚎鐐逛寒
-            etPassword.FoucsChanged += (sender, e) =>
+            etPassword.FoucsChanged = (sender, e) =>
             {
                 if (etPassword.Foucs)
                 {
@@ -388,8 +400,13 @@
             //褰撶劍鐐瑰湪瀵嗙爜鏂囨湰妗嗘椂锛岀偣鍑婚敭鐩樺洖鎾ゆ寜閿紝瑙﹀彂鐨勪簨浠�
             etPassword.EditorEnterAction += (obj) =>
             {
-                etPassword.Foucs = false;
+                Application.HideSoftInput();
             };
+            etPassword.MouseUpEventHandler = (sender, e) =>
+            {
+                etPassword.Foucs = true;
+            };
+
         }
 
         /// <summary>
@@ -430,7 +447,7 @@
                             var tip = new Tip()
                             {
                                 Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
-                                CloseTime = 3,
+                                CloseTime = 1,
                                 Direction = AMPopTipDirection.None
                             };
                             tip.Show(bodyView);
@@ -444,7 +461,7 @@
                             var tip = new Tip()
                             {
                                 Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
-                                CloseTime = 3,
+                                CloseTime = 1,
                                 Direction = AMPopTipDirection.None
                             };
                             tip.Show(bodyView);
@@ -528,6 +545,20 @@
                              * Wait : 鎺ㄩ�佹敞鍐�
                              */
 
+                            /*
+                             鏌ョ湅鏈湴鏄惁瀛樺湪鏁版嵁
+                             瀛樺湪鍒欏鍑�
+                             */
+                            var isExis = FileUtils.IsExisFolder(DB_ResidenceData.residenceData.CurReginID);
+                            if (isExis)
+                            {
+                                FileUtils.DeleteAllFile();
+                                string regionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID);
+                                FileUtils.RestoreRegionFiles(regionRootPath);
+                                DB_ResidenceData.residenceData.EixtAccount();
+                                OnAppConfig.Instance.RefreshUserConfig();
+                                DB_ResidenceData.InitRoomFunction();
+                            }
                             Application.RunOnMainThread(() =>
                             {
                                 //璺宠浆椤甸潰----
@@ -570,7 +601,7 @@
             }
             else
             {
-                //璋冪敤鐧诲綍鎺ュ彛
+                //璋冪敤楠岃瘉鐮佺櫥褰曟帴鍙�
                 loginResult = pm.LoginValidCode(account, password);
             }
             if (loginResult.StateCode.ToUpper() == "SUCCESS")
@@ -583,10 +614,10 @@
                     ID = (int)loginDataStr.GetValue("UserID"),
                     masterID = (int)loginDataStr.GetValue("MainUserID"),
                     accountType = (int)loginDataStr.GetValue("UserType"),
+                    loginTokenString = loginDataStr.GetValue("Token").ToString(),
                     accountString = account,
                     password = password,
                     lastTime = DateTime.Now,
-                    SIP_Account = loginDataStr.GetValue("AllVisionRegisterDevUserNameGuid").ToString(),
                     userName = loginDataStr.GetValue("Remark").ToString(),
                 };
                 MainPage.LoginUser.SaveUserInfo();
@@ -644,7 +675,7 @@
                     var tip = new Tip()
                     {
                         Text = tipStr,
-                        CloseTime = 3,
+                        CloseTime = 1,
                         Direction = AMPopTipDirection.None
                     };
                     tip.Show(bodyView);
@@ -660,7 +691,6 @@
         {
             var result = false;
             var responsePack = pm.GetHomePager();
-
 
             if (responsePack == "Success")
             {
@@ -681,7 +711,7 @@
                     var tip = new Tip()
                     {
                         Text = tipStr,
-                        CloseTime = 3,
+                        CloseTime = 1,
                         Direction = AMPopTipDirection.None
                     };
                     tip.Show(bodyView);

--
Gitblit v1.8.0