| | |
| | | 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 { } |
| | |
| | | } |
| | | else |
| | | { |
| | | BindingResidencePage page = new BindingResidencePage(); |
| | | MainPage.BaseView.AddChidren(page); |
| | | page.LoadView(); |
| | | |
| | | |
| | | |
| | | //2020-11-13 待确认 |
| | | //获取住宅失败,重新标记为未登录状态 |
| | | UserInfo.Current.LastTime = DateTime.MinValue; |
| | |
| | | // 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; |
| | |
| | | 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(); |
| | | } |