From 1b56157e8edc3f502810820d99b607e3629c7171 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 19 七月 2023 09:42:00 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wjc --- HDL_ON/Common/ApiUtlis.cs | 58 ++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 34 insertions(+), 24 deletions(-) diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index 5980873..95903e1 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -257,8 +257,10 @@ string videoList = videoInfo.Data.ToString(); FunctionList.List.videoIntercom = JsonConvert.DeserializeObject<List<UI.UI2.FuntionControlView.Video.Video>>(videoList); - foreach (var video in FunctionList.List.videoIntercom) + for(int i =0;i< FunctionList.List.videoIntercom.Count;i++) { + var video = FunctionList.List.videoIntercom[i]; + if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString()) { UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken; @@ -268,19 +270,27 @@ isInterphoneType_HDL = true; DB_ResidenceData.Instance.SupportFacePass = true; DB_ResidenceData.Instance.SaveResidenceData(); - - Entity.DB_ResidenceData.Instance.SupportFVDevice = true; + DB_ResidenceData.Instance.SupportFVDevice = true; } else if (video.interphoneType == InterphoneType.FREEVIEW.ToString()) { +#if __IOS__ + try + { + FunctionList.List.videoIntercom.Remove(video); + --i; + }catch(Exception ex) + { + MainPage.Log($"ios 鍏ㄨ閫氬紓甯� : {ex.Message}"); + } + +#else //涓哄叏瑙嗛�氬彲瑙嗗璁� DB_ResidenceData.Instance.SupportFacePass = true; Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; Entity.DB_ResidenceData.Instance.SupportFVDevice = true; - - //isInterphoneType_HDL = true; isInterphoneType_FREEVIEW = true; - +#endif } } } @@ -290,6 +300,7 @@ //濡傛灉妫�娴嬬嚎绋嬫病鍚姩锛屾墠缁х画涓嬮潰鎿嶄綔 鍥犱负App鏈夊彲鑳藉垰鍚姩椹笂鏀跺埌鎺ㄩ�佷簡锛岀劧鍚庢墠鎵ц鍒拌繖閲� if (HDLLinphone.Current.CheckIncomingCallThreadIsNull()) { + //褰撳墠浣忓畢鏄疕DL鍙瀵硅绫诲瀷鐨勮澶� if (isInterphoneType_HDL) { @@ -301,7 +312,6 @@ } else if (isInterphoneType_FREEVIEW) { - //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo(); callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; @@ -323,23 +333,22 @@ { #if __IOS__ - string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion; - string errorVersion = "16.2.0"; - if (systemVersion.CompareTo(errorVersion) < 0)///鍏ㄨ閫氫笉鍏煎ios16浠ヤ笂鐨勭郴缁燂紝涓嶈鍔犺浇杩欎釜鍏� - { - 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 = 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"); - - } - } + //string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion; + //string errorVersion = "16.2.0"; + //if (systemVersion.CompareTo(errorVersion) < 0)///鍏ㄨ閫氫笉鍏煎ios16浠ヤ笂鐨勭郴缁燂紝涓嶈鍔犺浇杩欎釜鍏� + //{ + // 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 = 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 } @@ -359,6 +368,7 @@ } + //======================缇ゆ帶==================== if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) { var pack = Ins.HttpRequest.GetGroupControlList(); -- Gitblit v1.8.0