HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-07-06 f23ad1b3f9f6193f35f72104d690b21dc67d5c1f
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 HdlResidenceLogic.Current.GetHomeListsFromDb();
                        var homes = HdlResidenceLogic.Current.GetHomeListsFromDb();
                        //刷新个人中心的内存及线程
                        await UserCenterLogic.InitUserCenterMenmoryAndThread();
                        UserCenterLogic.InitUserCenterMenmoryAndThread();
                        //启动ZigBee
                        ZigBee.Common.Application.Init();
@@ -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