From b74c052b43d7c4a830386940a036eb7c2ec9abc2 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期二, 14 一月 2020 13:37:26 +0800 Subject: [PATCH] 2020-1-14-01 --- ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs index 4ff194e..c8b31b4 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs @@ -510,6 +510,7 @@ { "Relationship",logic.Relationship} , { "LogicType",logic.LogicType} , { "LogicCustomPushText",logic.LogicCustomPushText} , + { "LogicIsCustomPushText",logic.LogicIsCustomPushText} , { "TimeAttribute", timeAttribute} , { "Conditions", conditions }, { "Actions", actions }, @@ -576,6 +577,7 @@ date.Add("LogicName", logic.LogicName); date.Add("Relationship", logic.Relationship); date.Add("LogicCustomPushText", logic.LogicCustomPushText); + date.Add("LogicIsCustomPushText", logic.LogicIsCustomPushText); mainGateWay?.Send("Logic/ReviseAttribute", jObject.ToString()); //await System.Threading.Tasks.Task.Run(async () => //{ @@ -624,6 +626,7 @@ logic.LogicType = int.Parse(Logicifon["LogicType"].ToString()); logic.Relationship = int.Parse(Logicifon["Relationship"].ToString()); logic.LogicCustomPushText =Logicifon["LogicCustomPushText"].ToString(); + logic.LogicIsCustomPushText = int.Parse(Logicifon["LogicIsCustomPushText"].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()); @@ -1127,7 +1130,30 @@ /// </summary> public static UserCenter.MemberInfoRes UserMemberInfoRes = null; #endregion + /// <summary> + /// 鑷繁鐢� + /// </summary> + public static void Zj(bool tag, Common.Logic logic) + { + new System.Threading.Thread(() => + { + if (logic.LogicId != 0) + { + if (tag) + { + Data("娣诲姞/鏇存柊", "/App/HomeLogicConfig", "POST"); + } + else + { + Data("鍒犻櫎", "/App/DelHomeLogicConfig", "POST"); + } + ///鍙敼鎺ㄩ�佸唴瀹癸紱 + LogicControlSwitch(logic); + } + }) + { IsBackground = true }.Start(); + } #region 璇锋眰鏈嶅姟鍣ㄦ柟娉�--- /// <summary> /// 璇锋眰鏁版嵁鐨勫皝瑁呮柟娉� @@ -1137,9 +1163,9 @@ /// <param name="method">璇锋眰鏂瑰紡涓篜OST/GET</param> /// <param name="obj">瀛樺偍鍙戦�佹暟鎹殑瀵硅薄</param> /// <returns></returns> - public static async System.Threading.Tasks.Task<string>Data(string command, string url, string method, object obj = null) + public static async System.Threading.Tasks.Task<string> Data(string command, string url, string method, object obj = null) { - var getUrl =""; + var getUrl = ""; var jObject = new JObject(); if (UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 1) { -- Gitblit v1.8.0