xm
2020-07-21 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d
ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs
@@ -101,21 +101,21 @@
                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();
                        //刷新个人中心的内存及线程
                        await UserCenterLogic.InitUserCenterMenmoryAndThread();
                        UserCenterLogic.InitUserCenterMenmoryAndThread();
                        //启动ZigBee
                        ZigBee.Common.Application.Init();
@@ -125,7 +125,7 @@
                            this.RemoveFromParent();
                            CommonPage.Instance.RemoveViewByTag("Register");
                            CommonPage.Instance.RemoveViewByTag("Login");
                            UserPage.Instance.Fresh();
                            UserPage.Instance.ReFreshControl();
                        });
                    }
                    else
@@ -135,7 +135,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 +153,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