From 09dfbfd9b77ec887c17b10f15799a1d3f56e4e17 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 15 十二月 2020 12:04:42 +0800
Subject: [PATCH] 2020-12-15-1
---
HDL_ON/UI/UI1-Login/LoginPageBLL.cs | 66 +++++++++++++++++++-------------
1 files changed, 39 insertions(+), 27 deletions(-)
diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index 4a8bae7..50bde1c 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 { }
@@ -599,7 +599,6 @@
{
//璺宠浆椤甸潰----
MainPage.GoUserPage();
- MainPage.InitializationData();
return;
}
});
@@ -615,28 +614,33 @@
*/
/*
- 鏌ョ湅鏈湴鏄惁瀛樺湪鏁版嵁
- 瀛樺湪鍒欏鍑�
+ * 鏌ョ湅鏈湴鏄惁瀛樺湪鏁版嵁
+ * 瀛樺湪鍒欏鍑�
*/
- 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(() =>
{
//璺宠浆椤甸潰----
MainPage.GoUserPage();
- MainPage.InitializationData();
});
}
else
{
+ BindingResidencePage page = new BindingResidencePage();
+ MainPage.BaseView.AddChidren(page);
+ page.LoadView();
+
+
+
//2020-11-13 寰呯‘璁�
//鑾峰彇浣忓畢澶辫触锛岄噸鏂版爣璁颁负鏈櫥褰曠姸鎬�
UserInfo.Current.LastTime = DateTime.MinValue;
@@ -697,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;
@@ -705,9 +715,10 @@
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;
@@ -759,12 +770,13 @@
var responsePack = pm.GetHomePager();
if (responsePack == StateCode.SUCCESS)
{
- //2020-11-13 寰呯‘璁わ紝娌℃湁浣忓畢锛屼笉绠楃櫥褰曟垚鍔�
- if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0)
- {
- result = true;
- }
- //result = true;
+ ////2020-11-13 寰呯‘璁わ紝娌℃湁浣忓畢锛屼笉绠楃櫥褰曟垚鍔�
+ //if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0)
+ //{
+ // result = true;
+ //}
+ //2020-12-10 娌℃湁浣忓畢鐧诲綍鎴愬姛锛屼絾鏄笉鑳借繘鍏ヤ富鐣岄潰
+ result = true;
}
else
{
--
Gitblit v1.8.0