From b1ced15165c0c120483f821079fc23c63d455e8e Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 05 三月 2021 17:54:49 +0800 Subject: [PATCH] 2021-3-5-1 --- HDL_ON/DAL/Mqtt/MqttClient.cs | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index a7dea34..d597565 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -194,7 +194,7 @@ //App璁㈤槄绾㈠瀹� / 缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 var pirStatus = new MqttTopicFilter() { - Topic = $"/user/${DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; @@ -287,10 +287,11 @@ ReceiveNotifySqueezeAsync(mMes); } //App璁㈤槄绾㈠瀹�/缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 - else if (topic == $"/user/${DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") { - var ss = Encoding.UTF8.GetString(e.ApplicationMessage.Payload); - HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontronsid = ss; + var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); + var revString = Encoding.UTF8.GetString(bytes); + HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontronsid = revString; //ReceiveCheckGateway(ss); //return; } -- Gitblit v1.8.0