From b8bdf52ccc38e3c6b0a95c2b60f59fc99dc546fd Mon Sep 17 00:00:00 2001 From: lss <lsc@hdlchina.com.cn> Date: 星期四, 22 四月 2021 09:25:06 +0800 Subject: [PATCH] 2021-4-22 对接乐橙可视对讲 --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs | 32 +++++++++++++++++++++++++------- 1 files changed, 25 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs index 43c4136..9e0557c 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs @@ -13,7 +13,6 @@ public class PirSend { - public static string pirId = "1367032976869658625"; /// <summary> /// 浣忓畢ID /// </summary> @@ -24,6 +23,12 @@ return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID; } } + + /// <summary> + /// 涔愭subAccessToken + /// </summary> + public static string LcSubAccessToken = ""; + /// <summary> /// 鏄惁涓哄叾浠栦富鐢ㄦ埛鍒嗕韩杩囨潵鐨勪綇瀹� /// </summary> @@ -49,6 +54,19 @@ //d.Add("pageSize", DB_ResidenceData.residenceData.residecenInfo.RegionID); //d.Add("pageNo", DB_ResidenceData.residenceData.residecenInfo.RegionID); var responsePackNew = RequestServerhomeId(jObject, NewAPI.Api_Post_GetDevcieList); + return responsePackNew; + } + /// <summary> + /// 鑾峰彇璁惧璇︽儏閫氳繃(spk,sid) + /// </summary> + /// <returns></returns> + public static ResponsePackNew GetinfoBySid(Control control) + { + var jObject = new JObject { }; + jObject.Add("homeId", HomeId); + jObject.Add("spk", control.spk); + jObject.Add("sid", control.sid); + var responsePackNew = RequestServerhomeId(jObject, NewAPI.Api_Post_GetinfoBySid); return responsePackNew; } /// <summary> @@ -168,7 +186,7 @@ /// 鑷鎸夐敭鍒犻櫎 /// </summary> /// <returns></returns> - public static ResponsePackNew CodeRemove(AttributesStatus buttonObj) + public static ResponsePackNew CodeRemove(AttributesStatus buttonObj,string deviceId) { var job = new JObject { }; job.Add("key", buttonObj.key); @@ -178,7 +196,7 @@ job.Add("value", valuejArray); var jArray = new JArray { }; jArray.Add(job); - var jObject = new JObject { { "homeId", HomeId }, { "deviceId", pirId }, { "attributes", jArray } }; + var jObject = new JObject { { "homeId", HomeId }, { "deviceId", deviceId }, { "attributes", jArray } }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_CodeRemove); return responsePackNew; } @@ -194,12 +212,12 @@ return responsePackNew; } /// <summary> - /// 淇敼绾㈠瀹濆悕绉� + /// 淇敼绾㈠瀹�/璁惧鍚嶇О /// </summary> /// <returns></returns> - public static ResponsePackNew DeviceRename(Pir pir) + public static ResponsePackNew DeviceRename(string deviceId,string name) { - var jObject = new JObject { { "homeId", HomeId }, { "deviceId", pir.deviceId }, { "name", pir.name } }; + var jObject = new JObject { { "homeId", HomeId }, { "deviceId", deviceId }, { "name", name} }; var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Ir_DeviceRename); return responsePackNew; } @@ -235,7 +253,7 @@ url = "/smart-footstone/app/ir/code/list"; jObject.Add("brandId", id); } - responsePackNew = RequestServerhomeId(jObject, url); + responsePackNew = RequestServerhomeId(jObject, url,5); } catch { } finally -- Gitblit v1.8.0