From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
index 8925b3c..89cf08e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -43,13 +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);
             rowAccount.AddChidren(txtCode, ChidrenBindMode.NotBind);
+            //鑱斿姩绾跨殑鐘舵��
+            txtCode.btnLine = btnLine;
 
             //涓嬩竴姝�
             var btnBottom = new BottomClickButton(688);
@@ -64,7 +66,11 @@
                     return;
                 }
                 //妫�绱㈡垚鍛樹俊鎭�
-                this.SearchMemberInfo(txtCode.Text.Trim());
+                string strCode = txtCode.Text.Trim();
+                HdlThreadLogic.Current.RunThread(() =>
+                {
+                    this.SearchMemberInfo(strCode);
+                });
             });
         }
 
@@ -77,34 +83,39 @@
         /// </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, new System.Collections.Generic.List<string>() { "AccountNoExists" });
+            var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new System.Collections.Generic.List<string>() { "AccountNoExists" });
             //鍏抽棴杩涘害鏉�
             this.CloseProgressBar();
 
-            if (result == null)
+            if (byteData == null)
             {
                 //寮傚父
                 return;
             }
-            if (result == string.Empty)
+            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();
+                HdlThreadLogic.Current.RunMain(() =>
+                {
+                    //鎴愬憳涓嶅瓨鍦�
+                    var form = new MemberNotEsixtForm();
+                    form.AddForm(Language.StringByID(R.MyInternationalizationString.uMemberInformation));
+                });
+
                 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);

--
Gitblit v1.8.0