From 014abc547ffd1a9f23c58fd7a471dffc5933fdd3 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 17 十二月 2020 14:27:56 +0800
Subject: [PATCH] Merge branch 'master' into NewFilePath

---
 HDL_ON/UI/UI1-Login/LoginPageBLL.cs |   50 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index e2b2aa8..a2d2bb8 100644
--- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -36,11 +36,11 @@
             try
             {
                 var mGlobalRegionListObj = Newtonsoft.Json.JsonConvert.DeserializeObject<GlobalRegionListRes>(result.Data.ToString());
-                if (UserInfo.Current.RequestHttpsHost != mGlobalRegionListObj.regionUrl)
+                if (OnAppConfig.Instance.RequestHttpsHost != mGlobalRegionListObj.regionUrl)
                 {
-                    UserInfo.Current.RequestHttpsHost = mGlobalRegionListObj.regionUrl;
-                    UserInfo.Current.GlobalRegion = mGlobalRegionListObj;
-                    UserInfo.Current.SaveUserInfo();
+                    OnAppConfig.Instance.RequestHttpsHost = mGlobalRegionListObj.regionUrl;
+                    OnAppConfig.Instance.GlobalRegion = mGlobalRegionListObj;
+                    OnAppConfig.Instance.SaveConfig();
                 }
             }
             catch { }
@@ -617,16 +617,16 @@
                              * 鏌ョ湅鏈湴鏄惁瀛樺湪鏁版嵁
                              * 瀛樺湪鍒欏鍑�
                              */
-                            var isExis = FileUtils.IsExisFolder(DB_ResidenceData.residenceData.CurReginID);
-                            if (isExis)
-                            {
-                                FileUtils.DeleteAllFile();
-                                string regionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID);
-                                FileUtils.RestoreRegionFiles(regionRootPath);
-                                DB_ResidenceData.residenceData.EixtAccount();
-                                OnAppConfig.Instance.RefreshUserConfig();
-                                SpatialInfo.CurrentSpatial.InitRoomFunction();
-                            }
+                            //var isExis = FileUtils.IsExisFolder(DB_ResidenceData.residenceData.CurReginID);
+                            //if (isExis)
+                            //{
+                            //    FileUtils.DeleteAllFile();
+                            //    string regionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID);
+                            //    FileUtils.RestoreRegionFiles(regionRootPath);
+                            //    DB_ResidenceData.residenceData.EixtAccount();
+                            //    OnAppConfig.Instance.RefreshUserConfig();
+                            //    SpatialInfo.CurrentSpatial.InitRoomFunction();
+                            //}
                             Application.RunOnMainThread(() =>
                             {
                                 //璺宠浆椤甸潰----
@@ -635,6 +635,12 @@
                         }
                         else
                         {
+                            BindingResidencePage page = new BindingResidencePage();
+                            MainPage.BaseView.AddChidren(page);
+                            page.LoadView();
+
+
+
                             //2020-11-13 寰呯‘璁�
                             //鑾峰彇浣忓畢澶辫触锛岄噸鏂版爣璁颁负鏈櫥褰曠姸鎬�
                             UserInfo.Current.LastTime = DateTime.MinValue;
@@ -695,6 +701,12 @@
                 //    refreshToken = revertData.refreshToken,
                 //    userName = revertData.name
                 //};
+                if (OnAppConfig.Instance.LastLoginUserId != revertData.userId)
+                {
+                    OnAppConfig.Instance.LastLoginUserId = revertData.userId;
+                    OnAppConfig.Instance.SaveConfig();
+                }
+                UserInfo.Current.ClearUserInfo();
                 UserInfo.Current.userType = revertData.userType;
                 UserInfo.Current.AccountString = account;
                 //UserInfo.Current.password = password;
@@ -703,17 +715,17 @@
                 UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken;
                 UserInfo.Current.RefreshToken = revertData.refreshToken;
                 UserInfo.Current.userName = revertData.name;
-                UserInfo.Current.userMobileInfo = "";//閲嶇疆鐢ㄦ埛鎵嬫満
-                UserInfo.Current.userEmailInfo = "";//閲嶇疆鐢ㄦ埛閭
-                UserInfo.Current.headImagePagePath = "LoginIcon/2.png";//閲嶇疆鐢ㄦ埛澶村儚
+                //UserInfo.Current.userMobileInfo = "";//閲嶇疆鐢ㄦ埛鎵嬫満
+                //UserInfo.Current.userEmailInfo = "";//閲嶇疆鐢ㄦ埛閭
+                //UserInfo.Current.headImagePagePath = "LoginIcon/2.png";//
+                //UserInfo.Current.CurrentRegion.RegionID = "";
                 UserInfo.Current.SaveUserInfo();
                 MainPage.Log("鐧诲綍鎴愬姛銆�");
                 result = true;
                 //鑾峰彇鐢ㄦ埛淇℃伅
                 new Thread(() =>
                 {
-                    pm.GetUserHeadImage(revertData.userId);
-                    pm.GetUserInfo(false);
+                    pm.GetUserInfo();
                 })
                 { IsBackground = true }.Start();
             }

--
Gitblit v1.8.0