| | |
| | | { |
| | | //调用接口,绑定网关(即使失败,也返回true往下走) |
| | | var pra = new { homeId = Config.Instance.Home.Id, mac = i_gatewayId, gatewayType = "ZIGBEEGATEWAY" }; |
| | | var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/bindGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); |
| | | var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/bindGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); |
| | | if (result == null || result.Code != HttpMessageEnum.A成功) |
| | | { |
| | | return -1; |
| | |
| | | { |
| | | //这个接口特殊,不需要检测权限 |
| | | var pra = new { homeId = i_homeId }; |
| | | var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/getGatewayList", RestSharp.Method.POST, pra); |
| | | var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/getGatewayList", RestSharp.Method.POST, pra); |
| | | if (result == null || result.Code != HttpMessageEnum.A成功) |
| | | { |
| | | return null; |
| | |
| | | public bool DeleteDataBaseGateway(string strWayId) |
| | | { |
| | | var pra = new { homeId = Config.Instance.Home.Id, mac = strWayId }; |
| | | var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/gateway/untieGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); |
| | | var result = HdlHttpLogic.Current.RequestResponseFromZigbeeHttps("home-wisdom/app/gateway/untieGateway", RestSharp.Method.POST, pra, null, null, CheckMode.A账号权限); |
| | | if (result == null || result.Code != HttpMessageEnum.A成功) |
| | | { |
| | | return false; |