黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/Login/AccountRegisterResultForm.cs
File was renamed from ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.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