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