From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
HDL_ON/Common/ApiUtlis.cs | 102 ++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 92 insertions(+), 10 deletions(-)
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 5ef13fc..9661856 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -140,6 +140,7 @@
// return;
//}
+ //return;
try
{
@@ -171,7 +172,8 @@
var deviceResult = Ins.HttpRequest.GetDeviceList("30", "1");
if (deviceResult.Code == StateCode.SUCCESS)
{
- FunctionList.List.Clear();
+ FunctionList.List.ClearDatas();
+ MainPage.Log($"============璁惧============寮�濮�" + FunctionList.List.Functions.Count);
//MainPage.Log($"璇诲彇璁惧淇℃伅鎴愬姛");
//MainPage.Log($"sid鍒楄〃鑾峰彇====" + deviceResult.Data.ToString());
var deviceList = JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString());
@@ -228,11 +230,10 @@
foreach (var newFunction in deviceList.list)
{
newFunction.AssembleStatus();
- newFunction.SaveFunctionFile();
+ newFunction.SaveFunctionFile();
FunctionList.List.IniFunctionList(newFunction.savePath,true);
MainPage.Log($"============璁惧============{iiii++}");
}
-
@@ -281,6 +282,7 @@
}
}
+
//======================鑾峰彇Sip璐﹀彿骞朵笖鍒濆鍖朣DK鍙瀵硅璁惧鍒楄〃====================
//濡傛灉妫�娴嬬嚎绋嬫病鍚姩锛屾墠缁х画涓嬮潰鎿嶄綔 鍥犱负App鏈夊彲鑳藉垰鍚姩椹笂鏀跺埌鎺ㄩ�佷簡锛岀劧鍚庢墠鎵ц鍒拌繖閲�
if (HDLLinphone.Current.CheckIncomingCallThreadIsNull())
@@ -296,6 +298,7 @@
}
else if (isInterphoneType_FREEVIEW)
{
+
//HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK
HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo();
callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id;
@@ -310,12 +313,25 @@
}
}
+
+
//======================鐧诲綍鍏ㄨ閫�====================
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
}
@@ -333,12 +349,78 @@
complateDevice = true;
MainPage.Log($"============璁惧============瀹屾垚" + FunctionList.List.Functions.Count);
}
- })
- { IsBackground = true }.Start();
- //===================鍦烘櫙==========================
- new System.Threading.Thread(() =>
- {
+
+#if DEBUG
+ DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl = true;
+#endif
+ if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
+ {
+ var pack = Ins.HttpRequest.GetGroupControlList();
+ if (pack != null)
+ {
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ try
+ {
+ var groupControlList = JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString());
+ var readSidList = new List<string>();
+ foreach(var temp in groupControlList)
+ {
+ FunctionList.List.groupControls.Clear();
+ readSidList.Add(temp.userDeviceGroupControlId);
+ if (readSidList.Count >= 20)
+ {
+ var data = Ins.httpRequest.GetGroupControInfo(readSidList);
+ if(data != null)
+ {
+ if(data.Code == StateCode.SUCCESS)
+ {
+ var groupControlInfoList = JsonConvert.DeserializeObject<List<GroupControl>>(data.Data.ToString());
+ FunctionList.List.groupControls.AddRange(groupControlInfoList);
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ }
+ }
+ readSidList.Clear();
+ }
+ }
+ if (readSidList.Count > 0)
+ {
+ var data = Ins.httpRequest.GetGroupControInfo(readSidList);
+ if (data != null)
+ {
+ if (data.Code == StateCode.SUCCESS)
+ {
+ var groupControlInfoList = JsonConvert.DeserializeObject<List<GroupControl>>(data.Data.ToString());
+ FunctionList.List.groupControls.AddRange(groupControlInfoList);
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ }
+ }
+ readSidList.Clear();
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"璇诲彇缁勬帶鍒楄〃澶辫触:{ex.Message}");
+ }
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+ }
+ }
+ }
+
+
+ //})
+ //{ IsBackground = true }.Start();
+
try
{
complateScene = false;
--
Gitblit v1.8.0