From c2cae389c932a9ab2c03d67d0276376655f26343 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 06 八月 2024 14:17:04 +0800 Subject: [PATCH] OnPro(安卓/IOS)可视对讲 TCP UDP连接选择 ;自动切换服务器 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 36 ++++++++++++++++++++++++------------ 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 46ccea0..c4aab5a 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -22,13 +22,10 @@ var sss = Newtonsoft.Json.Linq.JObject.FromObject("sss"); var xxx = homeJsonStr.GetValue("xxx").ToString(), - - Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("Id", fId); - var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); - - - */ + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("Id", fId); + var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); + */ string severAddress = "https://global.hdlcontrol.com/ProposedProductionApi"; @@ -710,7 +707,7 @@ if (mHomeGatewayRes.Count > 0) { DB_ResidenceData.Instance.HomeGateway = mHomeGatewayRes[0];//缃戝叧鐘舵�� - DriverLayer.Control.Ins.GatewayOnline_Cloud = mHomeGatewayRes[0].gatewayStatus; + HDL_ON.DriverLayer.Control.Ins.GatewayOnline_Cloud = mHomeGatewayRes[0].gatewayStatus; DB_ResidenceData.Instance.SaveResidenceData(); return revertObj.Code; } @@ -776,7 +773,7 @@ var mHomeGatewayRes = Newtonsoft.Json.JsonConvert.DeserializeObject<HomeGatewayInfo>(revertObj.Data.ToString()); if (mHomeGatewayRes != null) { - DriverLayer.Control.Ins.GatewayOnline_Cloud = mHomeGatewayRes.gatewayStatus; + HDL_ON.DriverLayer.Control.Ins.GatewayOnline_Cloud = mHomeGatewayRes.gatewayStatus; } } return revertObj.Code; @@ -1202,7 +1199,6 @@ deviceName = OnAppConfig.Instance.PhoneName, deviceType = deviceType, produce = isProduce, - }; mAddpushinfoObj.languageType = Utlis.GetPostLanguageType(); @@ -1229,7 +1225,6 @@ return true; } } - } else { @@ -1538,7 +1533,7 @@ } #endregion -#region 鑾峰彇澶╂皵閮ㄥ垎 + #region 鑾峰彇澶╂皵閮ㄥ垎 /// <summary> /// 鑾峰彇鎸囧畾缁忕含搴︾殑鍩庡競淇℃伅澶╂皵淇℃伅 /// </summary> @@ -2319,6 +2314,23 @@ var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_EditDevice, requestJson); } + + /// <summary> + /// 缂栬緫璁惧淇℃伅 + /// 缁戝畾鍏崇郴銆佸悕绉般�佹敹钘� + /// </summary> + /// <returns></returns> + public ResponsePackNew UpdataDevcieName(string deviceId,string name) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("deviceId", deviceId); + d.Add("name", name); + + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_EditDevice, requestJson); + } + /// <summary> /// 缂栬緫璁惧淇℃伅 /// 缁戝畾鍏崇郴銆佸悕绉般�佹敹钘� -- Gitblit v1.8.0