From 66c72ee19b9e3543537621b8dd25685c9b5c03c4 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 02 八月 2022 14:05:30 +0800
Subject: [PATCH] RGB色盘优化,第三方平台对接功能
---
HDL_ON/Common/ApiUtlis.cs | 66 ++++++++++++++++++++++++++++++---
1 files changed, 60 insertions(+), 6 deletions(-)
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index e16185b..c618e15 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -153,17 +153,35 @@
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($"璇诲彇璁惧淇℃伅鎴愬姛");
+ MainPage.Log($"sid鍒楄〃鑾峰彇===="+ deviceResult.Data.ToString());
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)
{
@@ -267,7 +285,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();
@@ -282,6 +301,19 @@
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())
+ {//涓哄叏瑙嗛�氬彲瑙嗗璁�
+ DB_ResidenceData.Instance.SupportFacePass = true;
+ Entity.DB_ResidenceData.Instance.SupportVisitorManage = true;
+ Entity.DB_ResidenceData.Instance.SupportFVDevice = true;
+
+ //isInterphoneType_HDL = true;
+ isInterphoneType_FREEVIEW = true;
+
}
}
}
@@ -293,7 +325,18 @@
if (isInterphoneType_HDL)
{
//HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK
- HDLLinphone.Current.GetHDLSipInfoAndInitSDK(DB_ResidenceData.Instance.CurrentRegion.id);
+ HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo();
+ callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id;
+ callVideoInfo.InterphoneType = InterphoneType.HDL.ToString();
+ HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo);
+ }
+ else if (isInterphoneType_FREEVIEW)
+ {
+ //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK
+ HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo();
+ callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id;
+ callVideoInfo.InterphoneType = InterphoneType.FREEVIEW.ToString();
+ HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo);
}
else
{
@@ -302,6 +345,16 @@
HDLLinphone.Current.LogoutAllAccount();
}
}
+
+ //======================鐧诲綍鍏ㄨ閫�====================
+ if (isInterphoneType_FREEVIEW)
+ {
+#if __IOS__
+ //鐧诲綍鍏ㄨ閫�
+ Shared.IOS.HDLFVSDK.Video.Init("", DB_ResidenceData.Instance.CurrentRegion.id);
+#endif
+ }
+
//======================瀹夐槻====================
GetSecurityList();
@@ -369,12 +422,12 @@
{
if (DB_ResidenceData.Instance.CurrentRegion != null)
{
- #region 璇诲彇鏈湴鏁版嵁
+#region 璇诲彇鏈湴鏁版嵁
//鎼滅储缃戝叧
DriverLayer.Control.Ins.SearchLoaclGateway();
//閲嶆柊杩炴帴mqtt
DAL.Mqtt.MqttClient.DisConnectRemote("鍒锋柊鏁版嵁锛岄噸杩瀖qtt",false);
- #endregion
+#endregion
}
}
@@ -427,6 +480,7 @@
FileUtlis.Files.DeleteFile(file);
}
}
+ FunctionList.List.securities.Clear();
foreach (var function in infoList)
{
function.SaveFile();
--
Gitblit v1.8.0