HDL Home App 第二版本 旧平台金堂用 正在使用
gxc
2020-01-02 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9
ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
@@ -411,10 +411,11 @@
                            var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
                            var homes = await House.GetHomeLists();
                            //启动ZigBee
                            ZigBee.Common.Application.Init();
                            //刷新个人中心的内存及线程
                            await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
                            //启动ZigBee
                            ZigBee.Common.Application.Init();
                            Shared.Common.Room.InitAllRoom();
                            Application.RunOnMainThread(() =>
                            {
@@ -560,10 +561,10 @@
                                    });
                                    var resultRegID = await Shared.Common.CommonPage.Instance.PushRegID();
                                    var homes = await House.GetHomeLists();
                                    //启动ZigBee
                                    ZigBee.Common.Application.Init();
                                    //刷新个人中心的内存及线程
                                    await UserCenter.UserCenterLogic.InitUserCenterMenmoryAndThread();
                                    //启动ZigBee
                                    ZigBee.Common.Application.Init();
                                    Shared.Common.Room.InitAllRoom();
                                    Application.RunOnMainThread(() =>
                                    {
@@ -669,6 +670,18 @@
                RefreshToken = authRes.refresh_token,
                OpenID = authRes.openid
            };
            //获取微信昵称
            var strUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=" + authRes.access_token;
            strUrl += "&openid=" + authRes.openid;
            var byteData = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
            if (byteData == null)
            {
                return false;
            }
            var receipData = System.Text.Encoding.UTF8.GetString(byteData);
            var nickData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserCenter.NicknameInfo>(receipData);
            auth.UserName = nickData.nickname;
            var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(auth);
            var revertObj = await CommonPage.Instance.RequestHttpsZigbeeAsync("ZigbeeUsers/InsertOrUpdateAuthUser", System.Text.Encoding.UTF8.GetBytes(requestJson));
            if (revertObj == null)