JLChen
2021-04-01 1ebda09d954de4409c5a7f3ba3c3ee75626ec7c0
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -290,21 +290,28 @@
                {
                    //清空之前数据
                    DeviceTypeList.Clear();
                    var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString());
                    for (int a = 0; a < jArray.Count; a++)
                    try
                    {
                        var jay = jArray[a];
                        var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                        var objDeviceType = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceType>(str);
                        if (objDeviceType != null)
                        var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString());
                        for (int a = 0; a < jArray.Count; a++)
                        {
                            if (null == DeviceTypeList.Find((c) => c.id == objDeviceType.id))
                            var jay = jArray[a];
                            var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
                            var objDeviceType = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceType>(str);
                            if (objDeviceType != null)
                            {
                                DeviceTypeList.Add(objDeviceType);
                                if (null == DeviceTypeList.Find((c) => c.id == objDeviceType.id))
                                {
                                    DeviceTypeList.Add(objDeviceType);
                                }
                            }
                        }
                        action();
                    }
                    action();
                    catch
                    {
                    }
                }
                else
                {