From 2450c12c825ad4d78d1572da2fa421706db2df2f Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 18 六月 2020 16:01:14 +0800
Subject: [PATCH] 新代码

---
 ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
index 614f21d..e0fe24b 100755
--- a/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
+++ b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs
@@ -32,9 +32,10 @@
         /// <param name="account">鐧婚檰璐﹀彿</param>
         public void ShowForm(string account = "")
         {
-            if (Config.Instance.IsLogin == true)
+            if (account == string.Empty)
             {
-                return;
+                //浣跨敤涓婁竴娆$櫥闄嗙殑璐﹀彿
+                account = Common.Config.Instance.Account;
             }
             CommonPage.Instance.IsDrawerLockMode = true;
             this.Tag = "Login";
@@ -841,7 +842,7 @@
                             HomePage.Instance.ShowLoginLoadView();
                         });
                         var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
-                        var homes = await House.GetHomeLists();
+                        var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
                         //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                         await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
                         //鍚姩ZigBee
@@ -907,7 +908,7 @@
                 var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString());
                 var revertData = responseDataObj;
                 //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
-                UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
+                Config.Instance.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
                 Config.Instance.Account = revertData.Account;
                 Config.Instance.MD5PWD = revertData.MD5PWD;
                 Config.Instance.Guid = revertData.Guid;
@@ -1094,7 +1095,7 @@
                 var revertData = responseDataObj;
                 Config.ReFresh();
                 //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄�
-                UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
+                Config.Instance.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid;
                 Config.Instance.Account = revertData.Account;
                 Config.Instance.Password = i_psw;
                 Config.Instance.MD5PWD = revertData.MD5PWD;
@@ -1104,7 +1105,7 @@
                 Config.Instance.Save();
 
                 var resultRegID = await CommonPage.Instance.PushRegID();
-                var homes = await House.GetHomeLists();
+                var homes = await HdlResidenceLogic.Current.GetHomeListsFromDb();
                 //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼
                 await UserCenterLogic.InitUserCenterMenmoryAndThread();
                 //鍚姩ZigBee

--
Gitblit v1.8.0