| | |
| | | |
| | | } |
| | | } |
| | | /// <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> |
| | | /// 获取住宅下的成员账号 |