| | |
| | | /// <param name="deviceId">设备id</param> |
| | | /// <param name="action">成功返回true</param> |
| | | /// <param name="tipType">是否需要提示,默认提示</param> |
| | | public bool DelDevice(string deviceId,Action<bool>action, TipType tipType = TipType.flicker) |
| | | public void DelDevice(string deviceId, Action<bool> action, TipType tipType = TipType.flicker) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceId", deviceId);//设备id |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Aks_KeypadExecute, "删除海信电视"); |
| | | d.Add("deviceIds", new List<string> { deviceId });//设备id |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_UnbindDeviceToHome, "删除海信电视"); |
| | | if (!this.DataChecking(responsePackNew, tipType)) |
| | | { |
| | | return false; |
| | | action?.Invoke(false); |
| | | } |
| | | return true; |
| | | action?.Invoke(true); |
| | | } |
| | | |
| | | /// <summary> |