From 39e83c7df7608b29a3f359bcc6d9ca9b7ff095f5 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期二, 17 五月 2022 13:54:39 +0800
Subject: [PATCH] 增加预编译条件

---
 HDL_ON/Common/ApiUtlis.cs |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 75c9bf3..35d8c7d 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -284,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();
@@ -299,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;
+
                             }
                         }
                     }
@@ -311,14 +323,26 @@
                         {
                             //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK
                             HDLLinphone.Current.GetHDLSipInfoAndInitSDK(DB_ResidenceData.Instance.CurrentRegion.id);
+
                         }
                         else
                         {
                             Utlis.WriteLine("褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅,閫�鍑虹櫥褰曟墍鏈夎处鍙�");
                             //褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅
                             HDLLinphone.Current.LogoutAllAccount();
+
                         }
                     }
+
+                    //======================鐧诲綍鍏ㄨ閫�====================
+                    if (isInterphoneType_FREEVIEW)
+                    {
+#if __IOS__
+                        //鐧诲綍鍏ㄨ閫�
+                        Shared.IOS.HDLFVSDK.Video.Init("", DB_ResidenceData.Instance.CurrentRegion.id);
+#endif
+                    }
+
 
                     //======================瀹夐槻====================
                     GetSecurityList();
@@ -386,12 +410,12 @@
                 {
                     if (DB_ResidenceData.Instance.CurrentRegion != null)
                     {
-                        #region 璇诲彇鏈湴鏁版嵁
+#region 璇诲彇鏈湴鏁版嵁
                         //鎼滅储缃戝叧
                         DriverLayer.Control.Ins.SearchLoaclGateway();
                         //閲嶆柊杩炴帴mqtt
                         DAL.Mqtt.MqttClient.DisConnectRemote("鍒锋柊鏁版嵁锛岄噸杩瀖qtt",false);
-                        #endregion
+#endregion
 
                     }
                 }

--
Gitblit v1.8.0