HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-12-20 23fb45dd846ed8b62304c408c6bbe64265d4ac8b
ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
@@ -44,24 +44,25 @@
                    else if (topic == gatewayID + "/" + "Bind/SetBind_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
                        var tempBindList = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["BindList"].ToString());
                        if (tempBindList == null)
                        //var tempBindList = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["BindList"].ToString());
                        var tempResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AddedDeviceBindResponseData>(jobject["Data"].ToString());
                        if (tempResult == null)
                        {
                            result = new AddedDeviceBindResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            var dataBindRes = new AddedDeviceBindResponseData();
                            for (int m = 0; tempBindList != null && m < tempBindList.Count; m++)
                            {
                                var tempBind = tempBindList[m];
                                dataBindRes.BindList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindListResponseObj>(tempBind.ToString()));
                            }
                            if (dataBindRes != null)
                            {
                                result = new AddedDeviceBindResponseAllData { addedDeviceBindResponseData = dataBindRes };
                                DebugPrintLog($"UI收到通知后的主题_{topic}");
                            }
                            //var dataBindRes = new AddedDeviceBindResponseData();
                            //for (int m = 0; tempBindList != null && m < tempBindList.Count; m++)
                            //{
                            //    var tempBind = tempBindList[m];
                            //    dataBindRes.BindList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindListResponseObj>(tempBind.ToString()));
                            //}
                            //if (dataBindRes != null)
                            //{
                            result = new AddedDeviceBindResponseAllData { addedDeviceBindResponseData = tempResult };
                            DebugPrintLog($"UI收到通知后的主题_{topic}");
                            //}
                        }
                    }
                    //else if (topic == gatewayID + "/" + "Bind/BindResult")
@@ -219,7 +220,7 @@
            /// 0:绑定所有目标成功
            ///<para>1:绑定目标失败,绑定设备目标有漏掉</para> 
            /// </summary>
            public int Result;
            public int Result = -1;
        }
        /// <summary>