wei
2020-12-23 f345087dbefecef9146fdb13481cb9ee3320d576
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -599,6 +599,27 @@
            }
        }
        /// <summary>
        /// 获取网关信息
        /// </summary>
        public string GetGatewayInfo()
        {
            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 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();
                }
            }
            return revertObj.Code;
        }
        /// <summary>
        /// 获取住宅下的成员账号