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 | 47 ++++++++++++++++++++++++++++++-----------------
1 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs
index e2b2aa8..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 { }
@@ -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,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;
--
Gitblit v1.8.0