黄学彪
2020-07-06 f23ad1b3f9f6193f35f72104d690b21dc67d5c1f
ZigbeeApp/Shared/Phone/UserCenter/OtherParty/OtherPartyAccountMenuForm.cs
@@ -41,12 +41,12 @@
            //清空bodyFrame
            this.ClearBodyFrame();
            HdlThreadLogic.Current.RunThread(async () =>
            HdlThreadLogic.Current.RunThread(() =>
            {
                //打开进度条
                this.ShowProgressBar();
                //获取绑定数据
                var result = await this.GetBingData();
                var result = this.GetBingData();
                if (result == false)
                {
                    //关闭进度条
@@ -173,12 +173,12 @@
        /// 获取绑定数据
        /// </summary>
        /// <returns></returns>
        private async Task<bool> GetBingData()
        private bool GetBingData()
        {
            this.dicBindData = new Dictionary<string, OtherPartyResult>();
            var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetUserAuthItem", false, "");
            if (result == null)
            var result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetUserAuthItem", false, "");
            if (string.IsNullOrEmpty(result) == true)
            {
                return false;
            }
@@ -223,12 +223,12 @@
        /// 绑定微信
        /// </summary>
        /// <param name="infoData"></param>
        private async void BindWechat(string accessToken, string refreshToken, string openID)
        private void BindWechat(string accessToken, string refreshToken, string openID)
        {
            //获取微信昵称
            var strUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=" + accessToken;
            strUrl += "&openid=" + openID;
            var byteData = await Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
            var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(strUrl, null, null, "GET");
            if (byteData == null)
            {
                return;
@@ -239,7 +239,7 @@
            //先上传微信资料
            var pra = new { AccessToken = accessToken, RefreshToken = refreshToken, OpenID = openID, UserName = nickData.nickname };
            var listNotShow = new List<string>() { "UserNoBindAccount" };
            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/InsertOrUpdateAuthUser", false, pra, listNotShow);
            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/InsertOrUpdateAuthUser", false, pra, listNotShow);
            if (result == false)
            {
                return;
@@ -247,7 +247,7 @@
            //再执行绑定
            var pra2 = new { AccountGuid = Common.Config.Instance.Guid, OpenID = openID };
            result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAuthUserToAccount", false, pra2);
            result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/BindAuthUserToAccount", false, pra2);
            if (result == true)
            {
                //绑定成功!下次你可以用微信{0}账号快速登录啦
@@ -267,10 +267,10 @@
        /// 解除绑定
        /// </summary>
        /// <param name="infoData"></param>
        private async void UnBindOtherParty(OtherPartyResult infoData)
        private void UnBindOtherParty(OtherPartyResult infoData)
        {
            var pra = new { DistributedMark = infoData.Id };
            var result = await UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UnBindUserAuth", false, pra);
            var result = UserCenterLogic.GetResultStatuByRequestHttps("ZigbeeUsers/UnBindUserAuth", false, pra);
            if (result == true)
            {
                //重新刷新界面