From 62d6c4bf6c30da21ccd8245199234c5004117d56 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 21 四月 2023 13:32:15 +0800
Subject: [PATCH] V1.7.1发布版本

---
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs |  109 +++++++++++++++++-------------------------------------
 1 files changed, 35 insertions(+), 74 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs
index 35af275..e77c9d6 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs
@@ -20,7 +20,6 @@
         /// <summary>
         /// 
         /// </summary>
-        /// <param name="isStartCheckResidenceThread">鏄惁寮�鍚綇瀹呯洃鍚嚎绋嬶紝娌℃湁浣忓畢鐨勬椂鍊欏埆浜烘壂鐮佹坊鍔犱綘涓烘垚鍛樼殑鏃跺�欒皟鐢�</param>
         public void LoadPage()
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
@@ -56,90 +55,52 @@
             };
             bodyView.AddChidren(btnHomeName);
 
-          
-
-            //浜岀淮鐮�
-            int codeWidth = Application.GetRealWidth(266);
-            ImageView codeImage = new ImageView()
-            {
-                Gravity = Gravity.Center,
-                Height = codeWidth,
-                Width = codeWidth,
-                ImageBytes = Scan.BytesFromText(Entity.DB_ResidenceData.Instance.CurrentRegion.deliverUrl,codeWidth, codeWidth),
-            };
-            backView.AddChidren(codeImage);
-
-            ////浜岀淮鐮佷腑蹇冨ご鍍�
-            //int imageWidth = Application.GetMinRealAverage(60);
-            //int imageX = codeImage.X + (codeWidth - imageWidth) / 2;
-            //int imageY = codeImage.Y + (codeWidth - imageWidth) / 2;
-            //ImageView headImage2 = new ImageView()
-            //{
-            //    X = imageX,
-            //    Y = imageY,
-            //    Width = imageWidth,
-            //    Height = imageWidth,
-            //    ImagePath = UserInfo.Current.headImagePagePath,
-            //    BorderColor = CSS_Color.MainBackgroundColor,
-            //    BorderWidth = (uint)Application.GetRealWidth(2),
-            //    Radius = (uint)Application.GetMinRealAverage(30),
-            //};
-            //backView.AddChidren(headImage2);
-
-
-         
-        }
-
-        /// <summary>
-        /// 寮�鍚娴嬩綇瀹呮槸鍚﹀凡缁忔坊鍔犱簡鐨勭嚎绋�
-        /// </summary>
-        private void StartCheckResidenceThread()
-        {
-            //鑾峰彇浣忓畢鍒楄〃鐨勫弬鏁�
-            var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(new DAL.Server.GetHomeListObj() { homeType = HomeTypeEnum.ALL.ToString() });
-
-            new System.Threading.Thread(() =>
-            {
-                while (this.Parent != null)
+            var waitPage = new Loading();
+            bodyView.AddChidren(waitPage);
+            waitPage.Start("");
+            new System.Threading.Thread(() => {
+                try
                 {
-                    System.Threading.Thread.Sleep(4000);
-                    if (this.Parent == null)
+                    var pack = Common.ApiUtlis.Ins.HttpRequest.GetHouseDeliveryUrl();
+                    if (pack != null)
                     {
-                        break;
-                    }
-                    //璁块棶浜戠鑾峰彇鍒楄〃
-                    var resultObj = DAL.Server.HttpUtil.RequestHttpsPost(DAL.Server.NewAPI.API_POST_Gethomepager, requestJson);
-                    if (resultObj.Code == DAL.Server.StateCode.SUCCESS)
-                    {
-                        var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString());
-                        if (homeList == null || homeList.Count == 0)
+                        if (pack.Code == DAL.Server.StateCode.SUCCESS)
                         {
-                            //濡傛灉杩樻病鏈変綇瀹呯殑璇�,缁х画涓嬩竴娆℃娴�
-                            continue;
+                            var deliveryUrl = pack.Data.ToString();
+                            Application.RunOnMainThread(() => {
+                                //浜岀淮鐮�
+                                int codeWidth = Application.GetRealWidth(266);
+                                ImageView codeImage = new ImageView()
+                                {
+                                    Gravity = Gravity.Center,
+                                    Height = codeWidth,
+                                    Width = codeWidth,
+                                    ImageBytes = Scan.BytesFromText(deliveryUrl, codeWidth, codeWidth),
+                                };
+                                backView.AddChidren(codeImage);
+                            });
                         }
-                        //璋冪敤On鍘熸潵鐨勬柟娉�,鍒锋柊浣忓畢鍒楄〃鍙婂叾缂撳瓨
-                        var pm = new DAL.Server.HttpServerRequest();
-                        pm.GetHomePager();
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log($"鑾峰彇浣忓畢浜や粯閾炬帴寮傚父:{ex.Message}");
+                }
+                finally
+                {
+                    if(waitPage!= null)
+                    {
                         Application.RunOnMainThread(() =>
                         {
-                            if (this.Parent == null)
-                            {
-                                return;
-                            }
-
-                            //璺宠浆椤甸潰----
-                            MainPage.GoUserPage(true, false, () =>
-                            {
-                                //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈�
-                                var form = new WellcomToHomeForm();
-                                form.ShowForm();
-                            });
+                            waitPage.RemoveFromParent();
                         });
-                        break;
                     }
                 }
             })
             { IsBackground = true }.Start();
+
+      
         }
+        
     }
 }

--
Gitblit v1.8.0