From 764185112d44c387e16f0483d8da898f8d998944 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 01 四月 2022 09:56:48 +0800
Subject: [PATCH] 大华可视对讲功能优化,自研可视对讲Android接入

---
 HDL_ON/Common/HDLCommon.cs |   37 ++++++++++++++++++++++++++++---------
 1 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 6a2a061..e77da10 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -330,16 +330,31 @@
                         }
                         else if (interphoneTypeEnum == InterphoneType.HDL.ToString())
                         {
-                            //HDL Linphone 鐙勮�愬厠
                             eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
                             eSVideoInfo.callId = json["callId"].ToString();
                             eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
                             eSVideoInfo.DeviceName = json["deviceName"].ToString();
                             eSVideoInfo.deviceSipAccount = json["deviceSipAccount"].ToString();
-                            //ShowAlert("鐙勮�愬厠闂ㄥ彛鏈哄懠鍙�");
-                            //鎵撳紑鍛煎彨椤甸潰
-                            HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo);
-                            return;
+
+
+                            if (json.ContainsKey("spk"))
+                            {
+                                if (json["spk"].ToString() == "door.gate")
+                                {
+                                    new PublicAssmebly().TipLinphoneCall("\""+ eSVideoInfo.DeviceName + "\"鍛煎彨", eSVideoInfo);
+
+                                    //HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo,true);
+                                    return;
+                                }
+                                else
+                                {
+                                    //HDL Linphone 鐙勮�愬厠
+                                    //ShowAlert("鐙勮�愬厠闂ㄥ彛鏈哄懠鍙�");
+                                    //鎵撳紑鍛煎彨椤甸潰
+                                    HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo,false);
+                                    return;
+                                }
+                            }
                         }
 
                         //3.鎵撳紑鍛煎彨椤甸潰
@@ -402,13 +417,14 @@
             //璐﹀彿鍦ㄥ埆澶勭櫥闄嗭紝琚涪涓嬬嚎 璺宠浆鍒扮櫥褰曢〉闈�
             new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
 
-            Logout();
+            Logout(false);
         }
 
         /// <summary>
         /// 閫�鍑虹櫥褰曟搷浣�
+        /// signOutPush 鏄惁鍒犻櫎鎺ㄩ�乼oken
         /// </summary>
-        public void Logout()
+        public void Logout(bool signOutPush = true)
         {
             //鍔犺浇Loading鏁堟灉
             var waitPage = new Loading();
@@ -419,8 +435,11 @@
             {
                 try
                 {
-                    //2.娉ㄩ攢鎺ㄩ��
-                    new HttpServerRequest().SignOutPush();
+                    if (signOutPush)
+                    {
+                        //2.娉ㄩ攢鎺ㄩ��
+                        new HttpServerRequest().SignOutPush();
+                    }
                     //3.璺宠浆鐧诲綍椤甸潰
                     UserInfo.Current.LastTime = DateTime.MinValue;
                     UserInfo.Current.SaveUserInfo();

--
Gitblit v1.8.0