From bcc1155365489498f171a245d26818be0aa526d0 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 25 三月 2021 18:40:59 +0800
Subject: [PATCH] 2021-03-25 1.完善丰林接口对接。

---
 HDL_ON/Common/HDLCommon.cs |   54 +++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 1abb521..6ab29de 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -277,22 +277,25 @@
                     }
                     else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString()))
                     {
-#if DEBUG
-#if __Android__
-                      
-                        ShowAlert("鏉ョ數閫氱煡锛侊紒锛侊紒");
+                        if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
 
-#else
-                        ESOnVideo.Current.Test();
-#endif
-#endif
-                        //瑙f瀽鍛煎彨鐨勯棬鍙f満UUID淇℃伅锛屽苟璺宠浆涓版灄鍛煎彨椤甸潰
-                        //ESVideoInfo eSVideoInfo = new ESVideoInfo()
-                        //{
-                        //    DeviceName = "瀹ゅ鏈�88",
-                        //    ESVideoUUID = "JJY000019VPLLF",
-                        //};
-                        //ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo);
+                        ESVideoInfo eSVideoInfo = GetESOnVideoJson(jpushMessageInfo.expantContent);
+
+                        if (eSVideoInfo == null) return;
+
+                        if (string.IsNullOrEmpty(eSVideoInfo.uuid)) return;
+
+                        if (eSVideoInfo.uuid.Contains(","))
+                        {
+                            var uuid = eSVideoInfo.uuid.Split(',');
+                            eSVideoInfo.ESVideoUUID = uuid[0];
+                        }
+                        else
+                        {
+                            eSVideoInfo.ESVideoUUID = eSVideoInfo.uuid;
+                        }
+
+                        ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo);
 
                     }
                 }
@@ -304,6 +307,27 @@
         }
 
         /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="jsonStr"></param>
+        /// <returns></returns>
+        ESVideoInfo GetESOnVideoJson(string jsonStr)
+        {
+            try
+            {
+                if (!string.IsNullOrEmpty(jsonStr))
+                {
+                    return Newtonsoft.Json.JsonConvert.DeserializeObject<ESVideoInfo>(jsonStr);
+                }
+                return null;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
+        /// <summary>
         /// 璐﹀彿鍦ㄥ埆澶勭櫥闄嗭紝琚涪涓嬬嚎 璺宠浆鍒扮櫥褰曢〉闈�
         /// 瑕佸湪涓荤嚎绋嬭皟鐢�
         /// 閫�鍑虹櫥褰曟搷浣�

--
Gitblit v1.8.0