From 7232642ff48a7fbde2018cde652f3e771fa58025 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 27 一月 2021 14:32:55 +0800 Subject: [PATCH] 20200127-英文版处理 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index cebeda9..c27acef 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -571,15 +571,14 @@ if (mHomeGatewayRes.Count > 0) { DB_ResidenceData.Instance.HomeGateway = mHomeGatewayRes[0]; - if (mHomeGatewayRes[0].gatewayStatus) - { - //DriverLayer.Control.Ins.IsRemote = true; - DriverLayer.Control.Ins.GatewayOnline = true; - } - else - { - DriverLayer.Control.Ins.GatewayOnline = false; - } + //if (mHomeGatewayRes[0].gatewayStatus) + //{ + // DriverLayer.Control.Ins.GatewayOnline = true; + //} + //else + //{ + // DriverLayer.Control.Ins.GatewayOnline = false; + //} DB_ResidenceData.Instance.SaveResidenceData(); return revertObj.Code; } @@ -608,15 +607,17 @@ Dictionary<string, object> d = new Dictionary<string, object>(); d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); - string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); + var jsonString = HttpUtil.GetSignRequestJson(d); var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGatewayInfo, jsonString); if (revertObj.Code == StateCode.SUCCESS) { var mHomeGatewayRes = Newtonsoft.Json.JsonConvert.DeserializeObject<HomeGatewayInfo>(revertObj.Data.ToString()); if (mHomeGatewayRes != null) { - DB_ResidenceData.Instance.HomeGateway = mHomeGatewayRes; - DB_ResidenceData.Instance.SaveResidenceData(); + if(mHomeGatewayRes.gatewayStatus) + { + DriverLayer.Control.Ins.GatewayOnline = true; + } } } return revertObj.Code; -- Gitblit v1.8.0