From 8c1bf42c5fca66625b59728006bd47bae0b6a3ad Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 23 十一月 2020 10:18:16 +0800 Subject: [PATCH] Revert "Merge branch 'CJL' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into CJL" --- HDL_ON/Common/MqttCommon.cs | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/HDL_ON/Common/MqttCommon.cs b/HDL_ON/Common/MqttCommon.cs index 3a94096..68ed1cd 100644 --- a/HDL_ON/Common/MqttCommon.cs +++ b/HDL_ON/Common/MqttCommon.cs @@ -158,7 +158,7 @@ // try // { // System.Threading.Thread.Sleep(200); -// //if (!MainPage.LoginUser.IsLogin) { +// //if (! UserInfo.Current.IsLogin) { // // continue; // //} // if (!CommonPage.IsRemote) continue; @@ -207,7 +207,7 @@ // var topicFilterPush2 = new TopicFilter // { -// Topic = $"/BusGateWayToClient/{MainPage.LoginUser.ID}" + PushNotifySqueeze, +// Topic = $"/BusGateWayToClient/{ UserInfo.Current.ID}" + PushNotifySqueeze, // QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce, // //QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce // }; @@ -255,7 +255,7 @@ // return; // } -// if (!MainPage.LoginUser.IsLogin) +// if (! UserInfo.Current.IsLogin) // { // return; // } @@ -315,7 +315,7 @@ // // ReceiveNotifySqueezeAsync (mMes); // //} else -// if (topic == $"/BusGateWayToClient/{MainPage.LoginUser.ID}" + PushNotifySqueeze) +// if (topic == $"/BusGateWayToClient/{ UserInfo.Current.ID}" + PushNotifySqueeze) // { // var mMes = System.Text.Encoding.UTF8.GetString(e.ApplicationMessage.Payload); // //鏂版尋涓嬬嚎涓婚鏂规 鏀跺埌鎸や笅绾夸富棰� @@ -679,7 +679,7 @@ // var username = MqttInfoConfig.Instance.mMqttInfo.connEmqUserName; // var passwordRemote = MqttInfoConfig.Instance.mMqttInfo.connEmqPwd; // MqttInfoConfig.Instance.CurRemoteMACInfo.clientId = clientId; -// //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken = MainPage.LoginUser.LoginTokenString; +// //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken = UserInfo.Current.LoginTokenString; // //鑾峰彇鍙傛暟鎴愬姛锛屼繚瀛樺埌鏈湴骞舵爣璁颁负true // MqttInfoConfig.Instance.IfGetMqttInfoSuccess = true; @@ -818,19 +818,19 @@ // //鏂紑杩滅▼杩炴帴 // CommonPage.IsRemote = false; -// if (!MainPage.LoginUser.IsLogin) +// if (! UserInfo.Current.IsLogin) // { // return; // } // DisConnectRemoteMqttClient("鎸や笅绾�"); -// MainPage.LoginUser.LastTime = DateTime.MinValue; -// MainPage.LoginUser.SaveUserInfo(); +// UserInfo.Current.LastTime = DateTime.MinValue; +// UserInfo.Current.SaveUserInfo(); // Room.Lists.Clear(); // ////鍒犻櫎鎺ㄩ�佹暟鎹� // //var webclient = new System.Net.WebClient (); -// //webclient.Headers.Add (System.Net.HttpRequestHeader.Authorization, MainPage.LoginUser.LoginTokenString); +// //webclient.Headers.Add (System.Net.HttpRequestHeader.Authorization, UserInfo.Current.LoginTokenString); // //webclient.DownloadStringAsync (new Uri ("https://global.hdlcontrol.com/HangZhouHdlCloudApi/ZigbeeUsers/SignOut")); @@ -838,7 +838,7 @@ // Application.RunOnMainThread(() => // { // Utlis.ShowAppLinkStatus(AppLinkStatus.WiFi); -// new Shared.SimpleControl.Phone.AccountLogin(MainPage.LoginUser.AccountString, "").Show(); +// new Shared.SimpleControl.Phone.AccountLogin( UserInfo.Current.AccountString, "").Show(); // SharedMethod.SharedMethod.CurPageLayout = null; // //CommonPage.IsRemote = false; @@ -852,7 +852,7 @@ // //2020-06-30 鍒犻櫎鎺ㄩ�佹暟鎹� // ForceUpdateUtlis.Current.SignOut(); //#if HDL -// if (!String.IsNullOrEmpty (MainPage.LoginUser.AllVisionRegisterDevUserNameGuid)) { +// if (!String.IsNullOrEmpty ( UserInfo.Current.AllVisionRegisterDevUserNameGuid)) { // com.freeview.global.Video.Logout (); // }///BusGateWayToClient/320c1fea-1866-4708-8277-e2321a4dd236/NotifyGateWayInfoChange //#endif @@ -945,7 +945,7 @@ // await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }); // break; // case 4://鍙戝竷鏂版柟妗堢殑鎸や笅绾夸富棰� -// topicName = $"/BusGateWayToClient/{MainPage.LoginUser.ID}" + PushNotifySqueeze; +// topicName = $"/BusGateWayToClient/{ UserInfo.Current.ID}" + PushNotifySqueeze; // //message = System.Text.Encoding.UTF8.GetBytes (PushSignStr); // await RemoteMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }); // break; @@ -1003,7 +1003,7 @@ // { // var mqttInfoRequestPar = new GetConnMqttInfoObj() // { -// LoginAccessToken = MainPage.LoginUser.LoginTokenString, +// LoginAccessToken = UserInfo.Current.LoginTokenString, // PlatformStr = GetRandomKey(), // PublishPayloadJsonStr = PushSignStr, // Mac = UserConfig.Instance.GatewayMAC, @@ -1029,7 +1029,7 @@ // MqttInfoConfig.Instance.CurRemoteMACInfo = mqttInfoRequestResult_Obj.AccountAllGateways.Find((obj) => obj.mac == UserConfig.Instance.GatewayMAC); // if (MqttInfoConfig.Instance.CurRemoteMACInfo != null) // { -// //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken = MainPage.LoginUser.LoginTokenString; +// //MqttInfoConfig.Instance.CurRemoteMACInfo.LoginAccessToken = UserInfo.Current.LoginTokenString; // MqttInfoConfig.Instance.CurRemoteMACInfo.clientId = clientId; // //----绗笁姝� 寮�濮嬭繛鎺� // await MQTTConnectAsync(); -- Gitblit v1.8.0