From 652243206427f35a256400a149a1734085824cb9 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 02 九月 2020 17:35:03 +0800 Subject: [PATCH] 2020-09-02-4 --- ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs index 20faead..4186077 100755 --- a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs +++ b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs @@ -98,24 +98,24 @@ HdlThreadLogic.Current.RunMain(() => { //鎵撳紑鍚姩椤� - HomePage.Instance.ShowLoginLoadView(); CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining)); - HdlThreadLogic.Current.RunThread(async () => + HdlThreadLogic.Current.RunThread(() => { //璐﹀彿瀵嗙爜鐧婚檰 - var loginSuccess = await HomePage.Instance.LoginByPWDAsync(account, password); + var loginSuccess = HomePage.Instance.LoginByPWDAsync(account, password); if (loginSuccess == 1) { if (string.IsNullOrEmpty(OpenID) == false) { //缁戝畾绗笁鏂� - await BindAuthUser(Config.Instance.Guid, OpenID); + BindAuthUser(Config.Instance.Guid, OpenID); } - var homes = await House.GetHomeLists(); + var homes = HdlResidenceLogic.Current.GetHomeListsFromDb(false); //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼ - await UserCenterLogic.InitUserCenterMenmoryAndThread(); + bool result = UserCenterLogic.InitUserCenterMenmoryAndThread(); + //鍚姩ZigBee ZigBee.Common.Application.Init(); @@ -125,7 +125,11 @@ this.RemoveFromParent(); CommonPage.Instance.RemoveViewByTag("Register"); CommonPage.Instance.RemoveViewByTag("Login"); - UserPage.Instance.Fresh(); + if (result == true) + { + //false:寮�鍚簡璋冭瘯鍔熻兘 + UserPage.Instance.ReFreshControl(); + } }); } else @@ -135,7 +139,7 @@ //鏈櫥褰曟垚鍔熷脊鍑虹櫥褰曠晫闈� 鍚屾椂闇�瑕佹爣璁颁负鏈櫥褰曠姸鎬� Config.Instance.LoginDateTime = new DateTime(1970, 1, 1); Config.Instance.Save(); - var login = new AccountLogin(); + var login = new AccountLoginForm(); CommonPage.Instance.AddChidren(login); login.ShowForm(account); }); @@ -153,14 +157,14 @@ /// </summary> /// <param name="guid"></param> /// <param name="openId"></param> - private async System.Threading.Tasks.Task BindAuthUser(string guid, string openId) + private void BindAuthUser(string guid, string openId) { var auth = new SendDataToServer.BindAuthUser(); auth.AccountGuid = guid; auth.OpenID = openId; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth); - await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/BindAuthUserToAccount", Encoding.UTF8.GetBytes(requestJson)); + CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/BindAuthUserToAccount", Encoding.UTF8.GetBytes(requestJson)); } #endregion -- Gitblit v1.8.0