From 45e4e387f3ef259b9e225fdd543e20be285a5112 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期二, 29 十月 2019 13:42:57 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-wjc --- ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 37 ++++++++++++++++++++++++++++++++----- 1 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs old mode 100644 new mode 100755 index a4e865e..133116c --- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs @@ -452,13 +452,26 @@ } } var accounts = new JArray(); - foreach (var dictionary in logic.Accounts) { + foreach (var dictionary in logic.Accounts) + { var Type = int.Parse(dictionary["Type"]); switch (Type) { - case 1: { + case 1: + { /// - } break; + if (logic.LogicType == 1) + { + var accounts1 = new JObject + { + ["Type"] = int.Parse(dictionary["Type"]), + ["Account"] = dictionary["Account"], + + }; + accounts.Add(accounts1); + } + } + break; case 7: { var location = new JObject @@ -481,6 +494,7 @@ { "IsEnable", logic.IsEnable} , { "LogicName", logic.LogicName}, { "Relationship",logic.Relationship} , + { "LogicType",logic.LogicType} , { "LogicCustomPushText",logic.LogicCustomPushText} , { "TimeAttribute", timeAttribute} , { "Conditions", conditions }, @@ -597,6 +611,7 @@ logic.Relationship = int.Parse(Logicifon["Relationship"].ToString()); logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.TimeAttributeObj>(Logicifon["TimeAttribute"].ToString()); logic.Conditions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Conditions"].ToString()); + logic.Accounts = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Accounts"].ToString()); List<Dictionary<string, object>> listactions = new List<Dictionary<string, object>>(); listactions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(Logicifon["Actions"].ToString()); @@ -815,7 +830,7 @@ public static List<DoorLock> ReadDoorLock(Residential lockifon) { List<DoorLock> list = new List<DoorLock>(); - System.Net.WebClient webClient = new System.Net.WebClient(); + System.Net.WebClient webClient = new System.Net.WebClient(); System.Collections.Specialized.NameValueCollection postValues = new System.Collections.Specialized.NameValueCollection(); postValues.Add("RequestVersion", CommonPage.RequestVersion); postValues.Add("LoginAccessToken", lockifon.Token); @@ -890,6 +905,18 @@ return DoorLockLocalUserId + "_" + OpenLockMode.ToString(); } } + return list; + } + + public class Residential + { + public string Id = string.Empty; + public bool IsOthreShare; + public string MainUserDistributedMark = string.Empty; + public string Url = string.Empty; + public string Token = string.Empty; + public bool IsOtherAccountCtrl; + public string doorlockmac; } public class MembershipIfon @@ -901,7 +928,7 @@ public static List<MembershipIfon> UserList = new List<MembershipIfon>(); - + #endregion } } -- Gitblit v1.8.0