From b1b3f47f3eeff8536b1a2851781da0b04f346fef Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 18 五月 2022 16:04:14 +0800 Subject: [PATCH] Merge branch 'wxr1215' into dev --- HDL_ON/Common/ApiUtlis.cs | 83 +++++++++++++++++++++++++++++++++++------ 1 files changed, 70 insertions(+), 13 deletions(-) diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index 5ef087c..b53302a 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -153,16 +153,34 @@ MainPage.Log($"璇诲彇鎴块棿鏁版嵁澶辫触:Code:{roomResult.Code}; msg:{roomResult.message}"); } //===================璁惧======================= - var deviceResult = Ins.HttpRequest.GetDeviceList(); + var deviceResult = Ins.HttpRequest.GetDeviceList("30","1"); if (deviceResult.Code == StateCode.SUCCESS) { - endTime = DateTime.Now.AddSeconds(100); + endTime = DateTime.Now.AddSeconds(5); + MainPage.Log($"璇诲彇璁惧淇℃伅鎴愬姛"); var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); if (deviceList == null) { deviceList = new DevcieApiPack(); } + try + { + while (deviceList.totalPage != deviceList.pageNo) + { + var deviceResult2 = Ins.HttpRequest.GetDeviceList("30", Convert.ToInt32(deviceList.pageNo) + 1 + ""); + if (deviceResult2.Code == StateCode.SUCCESS) + { + var deviceList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); + deviceList.pageNo = deviceList2.pageNo; + deviceList.list.AddRange(deviceList2.list); + } + } + }catch(Exception ex) + { + + } + string delFile = ""; if (FunctionList.List.GetDeviceFunctionList().Count > 0) { @@ -170,11 +188,11 @@ for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;) { var localFunction = FunctionList.List.GetDeviceFunctionList()[i]; - if (SPK.MusicSpkList().Contains(localFunction.spk)) - { - i++; - continue; - } + //if (SPK.MusicSpkList().Contains(localFunction.spk)) + //{ + // i++; + // continue; + //} var newFunction = deviceList.list.Find((obj) => obj.deviceId == localFunction.deviceId); if (delFile == localFunction.savePath) @@ -266,7 +284,8 @@ //======================鑾峰彇鍙瀵硅璁惧鍒楄〃==================== bool isInterphoneType_HDL = false;//鏄惁涓篐DLLinphone鍙瀵硅 - var videoInfo= VideoSend.GetVideoInfoList(); + bool isInterphoneType_FREEVIEW = false;//鏄惁涓哄叏瑙嗛�氬彲瑙嗗璁� + var videoInfo = VideoSend.GetVideoInfoList(); if (videoInfo.Code == StateCode.SUCCESS) { string videoList = videoInfo.Data.ToString(); @@ -281,6 +300,17 @@ isInterphoneType_HDL = true; DB_ResidenceData.Instance.SupportFacePass = true; DB_ResidenceData.Instance.SaveResidenceData(); + + Entity.DB_ResidenceData.Instance.SupportFVDevice = true; + + } + else if (video.interphoneType == InterphoneType.FREEVIEW.ToString()) + {//涓哄叏瑙嗛�氬彲瑙嗗璁� + Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; + Entity.DB_ResidenceData.Instance.SupportFVDevice = true; + + isInterphoneType_FREEVIEW = true; + } } } @@ -293,14 +323,44 @@ { //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK HDLLinphone.Current.GetHDLSipInfoAndInitSDK(DB_ResidenceData.Instance.CurrentRegion.id); + } else { Utlis.WriteLine("褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅,閫�鍑虹櫥褰曟墍鏈夎处鍙�"); //褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅 HDLLinphone.Current.LogoutAllAccount(); + //鐧诲綍鍏ㄨ閫氾紙鍏ㄨ閫氫笉鏍规嵁浣忓畢id鍙樺寲锛岄��鍑虹櫥褰曚細閫�鍑烘墍鏈塻ip璐﹀彿锛屾墍浠ユ澶勯渶瑕侀噸鏂扮櫥褰曞叏瑙嗛�氾級 + //Shared.IOS.HDLFVSDK.Video.Init("", UserInfo.Current.ID); + } } + + //======================鐧诲綍鍏ㄨ閫�==================== + if (isInterphoneType_FREEVIEW) + { +#if __IOS__ + //鑾峰彇鍏ㄨ閫氳处鎴蜂俊鎭� + string FVUserId = Ins.HttpRequest.GetVideoThirdPartUserInfo(); + if (FVUserId!=null) + { + + //鐧诲綍鍏ㄨ閫� + Shared.IOS.HDLFVSDK.Video.Init("", FVUserId); + + } + + +#endif + } + else { +#if __IOS__ + //涓嶆敮鎸佸叏瑙嗛�氾紙鐢ㄤ簬鍦╥os app鐢熷懡鍛ㄦ湡鍒ゆ柇鏄惁璋冪敤鍏ㄨ閫氭柟娉曪級 + Entity.DB_ResidenceData.Instance.SupportFVDevice = false; + +#endif + } + //======================瀹夐槻==================== GetSecurityList(); @@ -368,14 +428,12 @@ { if (DB_ResidenceData.Instance.CurrentRegion != null) { - #region 璇诲彇鏈湴鏁版嵁 - //璇诲彇闊充箰淇℃伅 - UI.Music.A31MusicModel.ReadMusicStates(); +#region 璇诲彇鏈湴鏁版嵁 //鎼滅储缃戝叧 DriverLayer.Control.Ins.SearchLoaclGateway(); //閲嶆柊杩炴帴mqtt DAL.Mqtt.MqttClient.DisConnectRemote("鍒锋柊鏁版嵁锛岄噸杩瀖qtt",false); - #endregion +#endregion } } @@ -449,7 +507,6 @@ { var pack = Ins.HttpRequest.GetSecurityList(); } - } } \ No newline at end of file -- Gitblit v1.8.0