From 60c59ea2ed4ee11a9989fdd4ce0ddace6efe452e Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 04 四月 2023 14:35:46 +0800 Subject: [PATCH] 群控备份 --- HDL_ON/Common/ApiUtlis.cs | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 47 insertions(+), 7 deletions(-) diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index d2d8544..893a034 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -314,9 +314,20 @@ //======================鐧诲綍鍏ㄨ閫�==================== if (isInterphoneType_FREEVIEW) { + #if __IOS__ - //鐧诲綍鍏ㄨ閫� - Shared.IOS.HDLFVSDK.Video.Init("", DB_ResidenceData.Instance.CurrentRegion.id); + List<VisitorTempPassword> dataList = new List<VisitorTempPassword>(); + Dictionary<string, object> dictionary = new Dictionary<string, object>(); + dictionary.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.id); + var requestJson = HttpUtil.GetSignRequestJson(dictionary); + ResponsePackNew pack = HttpUtil.RequestHttpsPost(NewAPI.Api_Post_GetExtMemberInfo, requestJson); + if(pack!= null) + { + var data = Newtonsoft.Json.JsonConvert.DeserializeObject<FreeviewMemberInfo>(pack.Data.ToString()); + //鐧诲綍鍏ㄨ閫� + Shared.IOS.HDLFVSDK.Video.Init("", data.extUserId, DB_ResidenceData.Instance.CurrentRegion.id, "78FF1E4D-FC0A-4E71-9B79-0448E4460BD7", "T0001", "120.77.53.170:9700", "120.77.53.170:21664"); + + } #endif } @@ -334,12 +345,41 @@ complateDevice = true; MainPage.Log($"============璁惧============瀹屾垚" + FunctionList.List.Functions.Count); } - }) - { IsBackground = true }.Start(); - //===================鍦烘櫙========================== - new System.Threading.Thread(() => - { + +#if DEBUG + DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl = true; +#endif + if (DB_ResidenceData.Instance.CurrentRegion.isSupportGroupControl) + { + var pack = Ins.HttpRequest.GetGroupControlList(); + if (pack != null) + { + if (pack.Code == StateCode.SUCCESS) + { + try + { + FunctionList.List.groupControls = JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString()); + } + catch (Exception ex) + { + MainPage.Log($"璇诲彇缁勬帶鍒楄〃澶辫触:{ex.Message}"); + } + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + } + } + + + //}) + //{ IsBackground = true }.Start(); + + ////===================鍦烘櫙========================== + //new System.Threading.Thread(() => + //{ try { complateScene = false; -- Gitblit v1.8.0