| | |
| | | var Logicifon = jObjectdata["Data"]; |
| | | logic.LogicId = int.Parse(Logicifon["LogicId"]?.ToString()); |
| | | logic.IsEnable = int.Parse(Logicifon["IsEnable"]?.ToString()); |
| | | logic.LogicName = Logicifon["LogicName"]?.ToString();
|
| | | logic.LogicCustomPushText = Logicifon["LogicCustomPushText"].ToString();
|
| | | logic.LogicName = Logicifon["LogicName"]?.ToString(); |
| | | |
| | | logic.Relationship = int.Parse(Logicifon["Relationship"]?.ToString()); |
| | | logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<TimeAttributeObj>(Logicifon["TimeAttribute"].ToString()); |
| | | logic.Conditions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Conditions"].ToString()); |
| | |
| | | { "Relationship",logic.Relationship} , |
| | | { "LogicType",logic.LogicType} , |
| | | { "LogicCustomPushText",logic.LogicCustomPushText} , |
| | | { "LogicIsCustomPushText",logic.LogicIsCustomPushText} , |
| | | { "TimeAttribute", timeAttribute} , |
| | | { "Conditions", conditions }, |
| | | { "Actions", actions }, |
| | |
| | | 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 () => |
| | | //{ |
| | |
| | | logic.IsEnable = int.Parse(Logicifon["IsEnable"].ToString()); |
| | | logic.LogicName = Logicifon["LogicName"].ToString(); |
| | | logic.LogicType = int.Parse(Logicifon["LogicType"].ToString()); |
| | | logic.Relationship = int.Parse(Logicifon["Relationship"].ToString());
|
| | | logic.LogicCustomPushText = Logicifon["LogicCustomPushText"].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()); |
| | |
| | | return await WebClientAsync(2, lockifon.Url, lockifon); |
| | | } |
| | | |
| | | //打印NameValueCollection()显示索引, 键,值 |
| | | //打印NameValueCollection()显示索引, 键,值 |
| | | public static void PrintKeysAndValues2(NameValueCollection myCol) |
| | | { |
| | | for (int i = 0; i < myCol.Count; i++) |
| | |
| | | /// <returns></returns> |
| | | public static async System.Threading.Tasks.Task<string>Data(string command, string url, string method, object obj = null) |
| | | { |
| | | var getUrl = CommonPage.RequestHttpsHost + url;//请求地址; |
| | | var getUrl =""; |
| | | var jObject = new JObject(); |
| | | if (UserCenter.UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | | getUrl = CommonPage.RequestHttpsHost + url;//请求地址; |
| | | jObject.Add("IsOtherAccountCtrl", false); |
| | | jObject.Add("LoginAccessToken", Config.Instance.Token); |
| | | } |
| | | else |
| | | { |
| | | getUrl = Config.Instance.AdminRequestBaseUrl + url;//请求地址; |
| | | jObject.Add("IsOtherAccountCtrl", true); |
| | | jObject.Add("LoginAccessToken", Config.Instance.AdminRequestToken); |
| | | } |
| | | switch (command) |
| | | { |
| | | case "添加/更新": |
| | | { |
| | | jObject.Add("RequestVersion", CommonPage.RequestVersion); |
| | | jObject.Add("LoginAccessToken", Config.Instance.Token); |
| | | //jObject.Add("LoginAccessToken", Config.Instance.Token); |
| | | jObject.Add("HomeId", Config.Instance.HomeId); |
| | | jObject.Add("LogicID", Common.Logic.CurrentLogic.LogicId); |
| | | jObject.Add("PushUserIds", new JArray { Config.Instance.Guid }); |
| | | jObject.Add("PushContent", Common.Logic.CurrentLogic.LogicCustomPushText); |
| | | |
| | | } |
| | | break; |
| | | case "删除": |
| | | { |
| | | jObject.Add("RequestVersion", CommonPage.RequestVersion); |
| | | jObject.Add("LoginAccessToken", Config.Instance.Token); |
| | | //jObject.Add("LoginAccessToken", Config.Instance.Token); |
| | | jObject.Add("HomeId", Config.Instance.HomeId); |
| | | jObject.Add("LogicID", Common.Logic.CurrentLogic.LogicId); |
| | | } |