From 3793a9a38ac6c4c4111c2bba3a35a71c30601e82 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 13 四月 2020 19:38:24 +0800 Subject: [PATCH] 上传个东西 --- ZigbeeApp/Shared/Phone/UserView/HomePage.cs | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs index 6a34fb4..37c1baf 100755 --- a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs +++ b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs @@ -61,15 +61,14 @@ { new System.Threading.Thread(async () => { - //鍚姩ZigBee - ZigBee.Common.Application.Init(); //鐧诲綍鎴愬姛 var homes = await House.GetHomeLists(); - //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼ - await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); + await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); + //鍚姩ZigBee + ZigBee.Common.Application.Init(); - Room.InitAllRoom(); + UserCenter.HdlRoomLogic.Current.InitAllRoom(); Application.RunOnMainThread(() => { @@ -93,16 +92,14 @@ //鐧诲綍澶辫触锛屼篃鐩存帴杩涘叆涓婚〉 new System.Threading.Thread(async () => { - //鍚姩ZigBee - ZigBee.Common.Application.Init(); - //鐧诲綍鎴愬姛 var homes = await House.GetHomeLists(); - //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼ - await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); + await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread(); + //鍚姩ZigBee + ZigBee.Common.Application.Init(); - Room.InitAllRoom(); + UserCenter.HdlRoomLogic.Current.InitAllRoom(); Application.RunOnMainThread(() => { @@ -120,7 +117,7 @@ else { //鏈櫥褰曞脊鍑虹櫥褰曠晫闈� - var accountLogin = new Device.Account.AccountLogin { }; + var accountLogin = new Login.AccountLogin { }; Shared.Common.CommonPage.Instance.AddChidren(accountLogin); accountLogin.Show(); } @@ -169,20 +166,17 @@ { return -1; } - //鍒濆鍖栫鐞嗗憳鏉冮檺淇℃伅(閲岄潰鏈夌壒娈婂垽鏂簡,鍙互鐩存帴璋冪敤) - await UserCenter.UserCenterLogic.InitAdminConnectMqttInfo(); var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.UserLoginRes>(revertObj.ResponseData.ToString()); - var revertData = responseDataObj; + var revertData = responseDataObj; + //鏍囪涓婁竴娆℃槸涓嶆槸鍚屼竴涓处鍙风櫥闄� + UserCenter.UserCenterResourse.ResidenceOption.TheSameLoginAccount = Config.Instance.Guid == revertData.Guid; Config.Instance.Account = revertData.Account; Config.Instance.Password = password; Config.Instance.MD5PWD = revertData.MD5PWD; Config.Instance.Guid = revertData.Guid; - Config.Instance.MqttKey = revertData.MqttKey; Config.Instance.LoginDateTime = DateTime.Now; - Config.Instance.ConnectZigbeeMqttBrokerPwd = revertData.ConnectZigbeeMqttBrokerPwd; - Config.Instance.ConnectZigbeeMqttClientId = revertData.ConnectZigbeeMqttClientId; - Config.Instance.ZigbeeMqttBrokerLoadSubDomain = revertData.ZigbeeMqttBrokerLoadSubDomain; + Config.Instance.LoginToken = revertData.Token; if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) { Config.Instance.AccountList.Add(revertData.Account); -- Gitblit v1.8.0