File was renamed from ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs |
| | |
| | | /// <summary> |
| | | /// 账号注册成功的提示界面 |
| | | /// </summary> |
| | | public class AccountRegisterSuccess : FrameLayout |
| | | public class AccountRegisterResultForm : FrameLayout |
| | | { |
| | | #region ■ 初始化_____________________________ |
| | | |
| | |
| | | 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(); |
| | |
| | | this.RemoveFromParent(); |
| | | CommonPage.Instance.RemoveViewByTag("Register"); |
| | | CommonPage.Instance.RemoveViewByTag("Login"); |
| | | if (result == true) |
| | | if (result2 == true) |
| | | { |
| | | //false:开启了调试功能 |
| | | UserPage.Instance.ReFreshControl(); |
| | |
| | | /// <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 |