| | |
| | | logicIfon.Add("pushConfigs", pushConfigsArray); |
| | | logicjArray.Add(logicIfon); |
| | | var jObject = new JObject { { "homeId", LogicMethod.Current.HomeId }, { "logics", logicjArray } }; |
| | | string str = jObject.ToString(); |
| | | responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add, "添加自动化", 5); |
| | | //如果是token过期则刷新token |
| | | if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) |
| | |
| | | var inputTypeJOb = new JObject { }; |
| | | inputTypeJOb.Add("sid", dictionary.sid); |
| | | inputTypeJOb.Add("condition_type", dictionary.condition_type); |
| | | |
| | | if (dictionary.condition_type == "9") |
| | | { |
| | | inputTypeJOb.Add("identifier", dictionary.identifier); |
| | | } |
| | | var conditionArray = new JArray { }; |
| | | foreach (var dic in dictionary.condition) |
| | | { |
| | |
| | | |
| | | logicjArray.Add(logicIfon); |
| | | var jObject = new JObject { { "homeId", LogicMethod.Current.HomeId }, { "logics", logicjArray } }; |
| | | |
| | | string str = jObject.ToString(); |
| | | responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update, "编辑更新自动化", 5); |
| | | //如果是token过期则刷新token |