| | |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("spk", spk); |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_UserList, "获取萤石门锁设备列表"); |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_GetDevcieList, "获取萤石门锁设备列表"); |
| | | if (!this.DataChecking(responsePackNew, tipType)) |
| | | { |
| | | return new List<Function>(); |
| | | } |
| | | var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Function>>(responsePackNew.Data.ToString()); |
| | | if (list == null) |
| | | var doorLockList = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockList>(responsePackNew.Data.ToString()); |
| | | if (doorLockList == null) |
| | | { |
| | | return new List<Function>(); |
| | | return new DoorLockList().list; |
| | | } |
| | | return list; |
| | | return doorLockList.list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取门锁型号列表(萤石视频门锁) |
| | | /// </summary> |
| | | /// <param name="tipType">是否需要提示,默认提示</param> |
| | | /// <returns>返回结果不会为null</returns> |
| | | public List<string> GetVideoDoorLockLockModelsList(TipType tipType = TipType.flicker) |
| | | { |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(new object { }, NewAPI.Api_Post_Lock_Models, "获取萤石门锁型号列表"); |
| | | if (!this.DataChecking(responsePackNew, tipType)) |
| | | { |
| | | return new List<string>(); |
| | | } |
| | | var lockModels = Newtonsoft.Json.JsonConvert.DeserializeObject<LockModels>(responsePackNew.Data.ToString()); |
| | | if (lockModels == null) |
| | | { |
| | | return new LockModels().lockModels; |
| | | } |
| | | return lockModels.lockModels; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 先获取萤石云子账号token |
| | | /// </summary> |