JLChen
2021-03-25 bcc1155365489498f171a245d26818be0aa526d0
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
                        //解析呼叫的门口机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>
        /// 账号在别处登陆,被踢下线 跳转到登录页面
        /// 要在主线程调用
        /// 退出登录操作