From c9cf816402cd7981315b658601a17ea1e1890f1e Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 27 十二月 2022 16:30:05 +0800
Subject: [PATCH] 备份

---
 HDL_ON/Common/ApiUtlis.cs |  166 +++++++++++++++++++++++++++++--------------------------
 1 files changed, 87 insertions(+), 79 deletions(-)

diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 0181540..7da5e6f 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -232,6 +232,93 @@
                                     FunctionList.List.IniFunctionList(newFunction.savePath);
                                     MainPage.Log($"============璁惧============{iiii++}");
                                 }
+
+
+
+
+                                //===================璇诲彇鍙瀵硅鏁版嵁==========================
+                                //鍒ゆ柇鏄惁鏈夊彲瑙嗗璁叉暟鎹紝鏈夊垯鏄剧ず鍙瀵硅icon
+                                //var flVideoInfo = HttpRequest.CheckFlVideo();
+                                //if(flVideoInfo.Code == StateCode.SUCCESS)
+                                //{
+                                //    FunctionList.List.videoIntercom1111 = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString());
+                                //}
+
+                                //======================鑾峰彇鍙瀵硅璁惧鍒楄〃====================
+                                bool isInterphoneType_HDL = false;//鏄惁涓篐DLLinphone鍙瀵硅
+                                bool isInterphoneType_FREEVIEW = false;//鏄惁涓哄叏瑙嗛�氬彲瑙嗗璁�
+                                var videoInfo = VideoSend.GetVideoInfoList();
+                                if (videoInfo.Code == StateCode.SUCCESS)
+                                {
+                                    string videoList = videoInfo.Data.ToString();
+                                    FunctionList.List.videoIntercom = JsonConvert.DeserializeObject<List<UI.UI2.FuntionControlView.Video.Video>>(videoList);
+
+                                    foreach (var video in FunctionList.List.videoIntercom)
+                                    {
+                                        if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString())
+                                        {
+                                            UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
+                                        }
+                                        else if (video.interphoneType == InterphoneType.HDL.ToString())
+                                        {
+                                            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;
+
+                                        }
+                                    }
+                                }
+
+                                //======================鑾峰彇Sip璐﹀彿骞朵笖鍒濆鍖朣DK鍙瀵硅璁惧鍒楄〃====================
+                                //濡傛灉妫�娴嬬嚎绋嬫病鍚姩锛屾墠缁х画涓嬮潰鎿嶄綔 鍥犱负App鏈夊彲鑳藉垰鍚姩椹笂鏀跺埌鎺ㄩ�佷簡锛岀劧鍚庢墠鎵ц鍒拌繖閲�
+                                if (HDLLinphone.Current.CheckIncomingCallThreadIsNull())
+                                {
+                                    //褰撳墠浣忓畢鏄疕DL鍙瀵硅绫诲瀷鐨勮澶�
+                                    if (isInterphoneType_HDL)
+                                    {
+                                        //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK
+                                        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
+                                    {
+                                        Utlis.WriteLine("褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅,閫�鍑虹櫥褰曟墍鏈夎处鍙�");
+                                        //褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅
+                                        HDLLinphone.Current.LogoutAllAccount();
+                                    }
+                                }
+
+                                //======================鐧诲綍鍏ㄨ閫�====================
+                                if (isInterphoneType_FREEVIEW)
+                                {
+#if __IOS__
+                        //鐧诲綍鍏ㄨ閫�
+                        Shared.IOS.HDLFVSDK.Video.Init("", DB_ResidenceData.Instance.CurrentRegion.id);
+#endif
+                                }
+
                             }
                             else
                             {
@@ -319,85 +406,6 @@
                     Logic.LogicList.Clear();//涓婚〉涓嬫媺寮哄埗鍒锋柊鑷姩鍖栧垪琛�
                     //UI.UI2.Intelligence.Automation.MainView.GetLogicList();
 
-                    //===================璇诲彇鍙瀵硅鏁版嵁==========================
-                    //鍒ゆ柇鏄惁鏈夊彲瑙嗗璁叉暟鎹紝鏈夊垯鏄剧ず鍙瀵硅icon
-                    //var flVideoInfo = HttpRequest.CheckFlVideo();
-                    //if(flVideoInfo.Code == StateCode.SUCCESS)
-                    //{
-                    //    FunctionList.List.videoIntercom1111 = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString());
-                    //}
-
-                    //======================鑾峰彇鍙瀵硅璁惧鍒楄〃====================
-                    bool isInterphoneType_HDL = false;//鏄惁涓篐DLLinphone鍙瀵硅
-                    bool isInterphoneType_FREEVIEW = false;//鏄惁涓哄叏瑙嗛�氬彲瑙嗗璁�
-                    var videoInfo = VideoSend.GetVideoInfoList();
-                    if (videoInfo.Code == StateCode.SUCCESS)
-                    {
-                        string videoList = videoInfo.Data.ToString();
-                        FunctionList.List.videoIntercom = JsonConvert.DeserializeObject<List<UI.UI2.FuntionControlView.Video.Video>>(videoList);
-
-                        foreach (var video in FunctionList.List.videoIntercom)
-                        {
-                            if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString())
-                            {
-                                UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
-                            } else if (video.interphoneType == InterphoneType.HDL.ToString()) {
-                                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;
-
-                            }
-                        }
-                    }
-
-                    //======================鑾峰彇Sip璐﹀彿骞朵笖鍒濆鍖朣DK鍙瀵硅璁惧鍒楄〃====================
-                    //濡傛灉妫�娴嬬嚎绋嬫病鍚姩锛屾墠缁х画涓嬮潰鎿嶄綔 鍥犱负App鏈夊彲鑳藉垰鍚姩椹笂鏀跺埌鎺ㄩ�佷簡锛岀劧鍚庢墠鎵ц鍒拌繖閲�
-                    if (HDLLinphone.Current.CheckIncomingCallThreadIsNull()) {
-                        //褰撳墠浣忓畢鏄疕DL鍙瀵硅绫诲瀷鐨勮澶�
-                        if (isInterphoneType_HDL)
-                        {
-                            //HDLLinphone鍙瀵硅,鑾峰彇Sip璐﹀彿骞跺垵濮嬪寲SDK
-                            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
-                        {
-                            Utlis.WriteLine("褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅,閫�鍑虹櫥褰曟墍鏈夎处鍙�");
-                            //褰撳墠浣忓畢涓嶆敮鎸丠DL鍙瀵硅
-                            HDLLinphone.Current.LogoutAllAccount();
-                        }
-                    }
-
-                    //======================鐧诲綍鍏ㄨ閫�====================
-                    if (isInterphoneType_FREEVIEW)
-                    {
-#if __IOS__
-                        //鐧诲綍鍏ㄨ閫�
-                        Shared.IOS.HDLFVSDK.Video.Init("", DB_ResidenceData.Instance.CurrentRegion.id);
-#endif
-                    }
 
 
                     //======================瀹夐槻====================

--
Gitblit v1.8.0