From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 14 十二月 2020 11:16:06 +0800 Subject: [PATCH] 合并了晾衣架(非新云端) --- ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Login/AccountRegisterResultForm.cs b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs similarity index 89% rename from ZigbeeApp/Shared/Phone/Login/AccountRegisterResultForm.cs rename to ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs index eb24b6d..9766a3c 100644 --- a/ZigbeeApp/Shared/Phone/Login/AccountRegisterResultForm.cs +++ b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs @@ -9,7 +9,7 @@ /// <summary> /// 璐﹀彿娉ㄥ唽鎴愬姛鐨勬彁绀虹晫闈� /// </summary> - public class AccountRegisterResultForm : FrameLayout + public class AccountRegisterSuccess : FrameLayout { #region 鈻� 鍒濆鍖朹____________________________ @@ -98,22 +98,23 @@ HdlThreadLogic.Current.RunMain(() => { //鎵撳紑鍚姩椤� - HdlControlLogic.Current.ShowLoginLoadView(); CommonPage.Loading.Start(Language.StringByID(R.MyInternationalizationString.Logining)); HdlThreadLogic.Current.RunThread(() => { //璐﹀彿瀵嗙爜鐧婚檰 - var result = HdlAccountLogic.Current.LoginByPassword(account, password); - if (result != null && result.Code == HttpMessageEnum.A鎴愬姛) + var loginSuccess = HomePage.Instance.LoginByPWDAsync(account, password); + if (loginSuccess == 1) { if (string.IsNullOrEmpty(OpenID) == false) { //缁戝畾绗笁鏂� BindAuthUser(Config.Instance.Guid, OpenID); } + var homes = HdlResidenceLogic.Current.GetHomeListsFromDb(false); + //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼ - bool result2 = HdlUserCenterLogic.Current.InitUserCenterMenmoryAndThread(true); + bool result = UserCenterLogic.InitUserCenterMenmoryAndThread(); //鍚姩ZigBee ZigBee.Common.Application.Init(); @@ -124,7 +125,7 @@ this.RemoveFromParent(); CommonPage.Instance.RemoveViewByTag("Register"); CommonPage.Instance.RemoveViewByTag("Login"); - if (result2 == true) + if (result == true) { //false:寮�鍚簡璋冭瘯鍔熻兘 UserPage.Instance.ReFreshControl(); @@ -158,12 +159,12 @@ /// <param name="openId"></param> private void BindAuthUser(string guid, string openId) { - //鈽嗐優銉笺偗鈽� 缁戝畾寰俊 - //var auth = new SendDataToServer.BindAuthUser(); - //auth.AccountGuid = guid; - //auth.OpenID = openId; + var auth = new SendDataToServer.BindAuthUser(); + auth.AccountGuid = guid; + auth.OpenID = openId; - //HdlHttpLogic.Current.RequestHttpsZigbeeAsync("ZigbeeUsers/BindAuthUserToAccount", RestSharp.Method.POST, auth, null, null); + var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth); + CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/BindAuthUserToAccount", Encoding.UTF8.GetBytes(requestJson)); } #endregion -- Gitblit v1.8.0