黄学彪
2020-09-22 ade5917841b0fdcb1df7353ef7c56b1a1bdc9282
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -43,14 +43,15 @@
            rowAccount.Y = Application.GetRealHeight(23);
            frame.AddChidren(rowAccount);
            //底线
            rowAccount.AddBottomLine();
            var btnLine = rowAccount.AddBottomLine();
            //请输入需要加入成员的ID(Email/手机号)
            var txtCode = new TextInputControl(Application.GetRealWidth(900), rowAccount.Height, false);
            txtCode.X = ControlCommonResourse.XXLeft;
            txtCode.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputAddMenberID);
            txtCode.PlaceholderTextColor = UserCenterColor.Current.TextTipColor;
            rowAccount.AddChidren(txtCode, ChidrenBindMode.NotBind);
            //联动线的状态
            txtCode.btnLine = btnLine;
            //下一步
            var btnBottom = new BottomClickButton(688);
@@ -65,7 +66,11 @@
                    return;
                }
                //检索成员信息
                this.SearchMemberInfo(txtCode.Text.Trim());
                string strCode = txtCode.Text.Trim();
                HdlThreadLogic.Current.RunThread(() =>
                {
                    this.SearchMemberInfo(strCode);
                });
            });
        }
@@ -78,26 +83,35 @@
        /// </summary>
        /// <param name="accountId">成员ID</param>
        /// <param name="txtMsg">信息控件</param>
        private async void SearchMemberInfo(string accountId)
        private void SearchMemberInfo(string accountId)
        {
            //开启进度条
            this.ShowProgressBar();
            var pra = new AccountInfoPra();
            pra.Account = accountId;
            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra);
            var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new System.Collections.Generic.List<string>() { "AccountNoExists" });
            //关闭进度条
            this.CloseProgressBar();
            if (result == null)
            if (byteData == null)
            {
                //异常
                return;
            }
            var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
            if (revertObj.StateCode == "AccountNoExists")
            {
                //成员不存在
                var form = new MemberNotEsixtForm();
                form.AddForm();
                return;
            }
            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(result);
            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(revertObj.ResponseData.ToString());
            infoResult.Account = accountId;
            Application.RunOnMainThread(() =>
            HdlThreadLogic.Current.RunMain(() =>
            {
                var form = new AddMemberInfoForm();
                form.AddForm(infoResult);