From 6bf515816c3c971f57722c5195208f65446ef335 Mon Sep 17 00:00:00 2001
From: tzy <274116637@qq.com>
Date: 星期一, 29 三月 2021 17:49:15 +0800
Subject: [PATCH] 完成新风功能
---
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