From adc150efb13a0506f45a3c344c3ee2ef2dba8e90 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 01 七月 2021 15:19:13 +0800
Subject: [PATCH] 合并嘉乐lc代码

---
 HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs |   66 ++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 1 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs
index a6eb973..862fb16 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs
@@ -1,4 +1,5 @@
 锘縰sing System;
+using System.Collections.Generic;
 using HDL_ON.UI.CSS;
 using Shared;
 
@@ -16,7 +17,11 @@
             bodyView = this;
         }
 
-        public void LoadPage()
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="isStartCheckResidenceThread">鏄惁寮�鍚綇瀹呯洃鍚嚎绋嬶紝娌℃湁浣忓畢鐨勬椂鍊欏埆浜烘壂鐮佹坊鍔犱綘涓烘垚鍛樼殑鏃跺�欒皟鐢�</param>
+        public void LoadPage(bool isStartCheckResidenceThread = false)
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
             new TopViewDiv(bodyView, Language.StringByID(StringId.MyQRcode)).LoadTopView();
@@ -112,6 +117,65 @@
             //    Radius = (uint)Application.GetMinRealAverage(30),
             //};
             //backView.AddChidren(headImage2);
+
+
+            if (isStartCheckResidenceThread)
+            {
+                //寮�鍚娴嬩綇瀹呮槸鍚﹀凡缁忔坊鍔犱簡鐨勭嚎绋�
+                this.StartCheckResidenceThread();
+            }
+        }
+
+        /// <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)
+                {
+                    System.Threading.Thread.Sleep(4000);
+                    if (this.Parent == 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)
+                        {
+                            //濡傛灉杩樻病鏈変綇瀹呯殑璇�,缁х画涓嬩竴娆℃娴�
+                            continue;
+                        }
+                        //璋冪敤On鍘熸潵鐨勬柟娉�,鍒锋柊浣忓畢鍒楄〃鍙婂叾缂撳瓨
+                        var pm = new DAL.Server.HttpServerRequest();
+                        pm.GetHomePager();
+                        Application.RunOnMainThread(() =>
+                        {
+                            if (this.Parent == null)
+                            {
+                                return ;
+                            }
+
+                            //璺宠浆椤甸潰----
+                            MainPage.GoUserPage(true, false, () =>
+                            {
+                                //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈�
+                                var form = new WellcomToHomeForm();
+                                form.ShowForm();
+                            });
+                        });
+                        break;
+                    }
+                }
+            })
+            { IsBackground = true }.Start();
         }
     }
 }

--
Gitblit v1.8.0