From 691dbe24f5724f153e07947c7b75bdfea5f0b6d5 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 24 九月 2024 16:15:15 +0800 Subject: [PATCH] 离线控制模式 --- HDL_ON/Common/HDLCommon.cs | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index 601e1a7..c9e3c41 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -537,20 +537,25 @@ switch (UserInfo.Current.AccountString) { case "464027401@qq.com": - case "649362315@qq.com": - case "13580507523": case "15626203746": - case "18316672920": return; } //鏈櫥褰曚笉鐢ㄥ鐞� - if (!UserInfo.Current.IsLogin) return; - - //璐﹀彿鍦ㄥ埆澶勭櫥闄嗭紝琚涪涓嬬嚎 璺宠浆鍒扮櫥褰曢〉闈� - new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show(); - + //if (!UserInfo.Current.IsLogin) return; + try + { + Application.RunOnMainThread(() => + { + //璐﹀彿鍦ㄥ埆澶勭櫥闄嗭紝琚涪涓嬬嚎 璺宠浆鍒扮櫥褰曢〉闈� + new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show(); + }); + } + catch (Exception ex) + { + MainPage.Log("Error", $"鎸や笅绾挎彁绀虹獥鍙e紓甯革細{ex.StackTrace}"); + } try { Logout(); @@ -581,8 +586,10 @@ //2.娉ㄩ攢鎺ㄩ�� new HttpServerRequest().SignOutPush(); //3.璺宠浆鐧诲綍椤甸潰 - UserInfo.Current.LastTime = DateTime.MinValue; + UserInfo.Current.ValidToken = false; UserInfo.Current.SaveUserInfo(); + OnAppConfig.Instance.LastLoginUserId = ""; + OnAppConfig.Instance.SaveConfig(); DB_ResidenceData.Instance.EixtAccount(); MainPage.Log("閫�鍑鸿处鍙锋竻绌烘暟鎹�"); //4.娉ㄩ攢HDLSIP璐﹀彿鐧诲綍 2021-08-20 @@ -595,7 +602,7 @@ //6.娓呯┖Siri鍏变韩鏁版嵁淇℃伅 new Other.SkipControl().SetData(false, "", "", "", ""); var sDM = new SiriKit.SceneDateManager(); - Console.WriteLine($"IsLogin:{sDM.IsLgoin};accessToken:{sDM.AccessToken};refreshToken:{sDM.RefreshToken};RegionUrl:{sDM.RegionUrl};HomeId:{sDM.HomeId}"); + //Console.WriteLine($"IsLogin:{sDM.IsLgoin};accessToken:{sDM.AccessToken};refreshToken:{sDM.RefreshToken};RegionUrl:{sDM.RegionUrl};HomeId:{sDM.HomeId}"); #endif } catch (Exception ex) @@ -636,7 +643,7 @@ public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo, bool isAlarm) { //娌$櫥褰曚笉澶勭悊 - if (UserInfo.Current == null || !UserInfo.Current.IsLogin || MainPage.BasePageView == null) + if (UserInfo.Current == null || MainPage.BasePageView == null) { return; } -- Gitblit v1.8.0