From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 14 十二月 2020 09:59:01 +0800 Subject: [PATCH] 请合并代码,完成晾衣架最终功能。 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs | 48 ++++++++++++++++++++++++------------------------ 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs index 7ff956a..c87c383 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs @@ -323,9 +323,8 @@ }; Newtonsoft.Json.Linq.JArray attriBute = new Newtonsoft.Json.Linq.JArray(); - if (device.DeviceEpoint == 2) - { - attriBute = new Newtonsoft.Json.Linq.JArray + //鏅捐。鏋剁殑鏅捐。鏋剁殑锛堢儤骞诧紝椋庡共锛屾秷姣�,鐓ф槑鐘舵�佽鍙栵級 + attriBute = new Newtonsoft.Json.Linq.JArray { new Newtonsoft.Json.Linq.JObject { @@ -333,27 +332,28 @@ { "AttriButeId", (int)AttriButeId.Switch} } }; - } - else - { - attriBute = new Newtonsoft.Json.Linq.JArray { - new Newtonsoft.Json.Linq.JObject - { - //鏅捐。鏋剁殑寮�鍏崇姸鎬侊紙鐑樺共锛岄骞诧紝娑堟瘨锛� - { "AttriButeId", (int)AttriButeId.Switch} - }, - new Newtonsoft.Json.Linq.JObject - { - //鏅捐。鏋剁殑鏅捐。鏋剁殑锛堢儤骞诧紝椋庡共锛屾秷姣掞級鍓╀綑鏃堕棿 - { "AttriButeId", (int)AttriButeId.AirerRemainTime} - }, - new Newtonsoft.Json.Linq.JObject - { - //鏅捐。鏋剁殑锛堢儤骞诧紝椋庡共锛屾秷姣掞級鏃堕棿 - { "AttriButeId", (int)AttriButeId.AirerTime} - } - }; - } + + //if (device.DeviceEpoint != 2) + //{ + //鐢变簬璁惧涓嶆敮鎸佹椂闂村姛鑳斤紝鍚庢湡鎵嶆敮鎸侊紝娉ㄦ剰澶勭悊鏃堕棿瑕佹牴鎹儤骞诧紝椋庡共锛屾秷姣掓槸鍚﹀紑鎵嶅彂閫佺浉搴斿ぇ鏃堕棿璇诲彇鏁版嵁 + //attriBute = new Newtonsoft.Json.Linq.JArray { + // new Newtonsoft.Json.Linq.JObject + // { + // //鏅捐。鏋剁殑寮�鍏崇姸鎬侊紙鐑樺共锛岄骞诧紝娑堟瘨锛� + // { "AttriButeId", (int)AttriButeId.Switch} + // }, + // new Newtonsoft.Json.Linq.JObject + // { + // //鏅捐。鏋剁殑鏅捐。鏋剁殑锛堢儤骞诧紝椋庡共锛屾秷姣掞級鍓╀綑鏃堕棿 + // { "AttriButeId", (int)AttriButeId.AirerRemainTime} + // }, + // new Newtonsoft.Json.Linq.JObject + // { + // //鏅捐。鏋剁殑锛堢儤骞诧紝椋庡共锛屾秷姣掞級鏃堕棿 + // { "AttriButeId", (int)AttriButeId.AirerTime} + // } + // }; + //} var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } }; jObject.Add("Data", data); device.Gateway?.Send("GetDeviceStatus", jObject.ToString()); -- Gitblit v1.8.0