wxr
2024-05-23 c5cb6840bd986bbd71a9ebc232bbf44ed0e1fc3d
HDL_ON/Common/HDLCommon.cs
@@ -280,109 +280,6 @@
                        //报警推送弹窗提示
                        ShowAlarmPushMessage(jpushMessageInfo, true);
                    }
                    else if (jpushMessageInfo.messageType == (PushMessageType.FLCall.ToString()))
                    {
                        if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
                        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, InterphoneType.FLVI.ToString());
                    }
                    else if (jpushMessageInfo.messageType == (PushMessageType.HDL_INTERPHONE.ToString()))
                    {
                        if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
                        //字段兼容问题,只能直接取值了
                        var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent);
                        //1.视对讲厂家类型
                        string interphoneTypeEnum = json["interphoneTypeEnum"].ToString();
                        if (string.IsNullOrEmpty(interphoneTypeEnum)) return;
                        ESVideoInfo eSVideoInfo = new ESVideoInfo();// GetESOnVideoJson(jpushMessageInfo.expantContent);
                        //2.根据可视对讲厂家类型,处理不同的数据
                        if (interphoneTypeEnum == InterphoneType.IMOUVISIAL.ToString())
                        {
                            //大华乐橙
                            eSVideoInfo.callId = json["callId"].ToString();
                            //eSVideoInfo.Lc_AccessToken = UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken;//json["subAccountToken"].ToString();//
                            eSVideoInfo.Lc_AccessToken = json["subAccountToken"].ToString();//2021-05-13 目前云端还没拿到Lc_AccessToken,目前没办法正常使用
                            eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
                            eSVideoInfo.Lc_Location = OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1;
                            eSVideoInfo.Lc_PlayToken = json["token"].ToString();
                            //eSVideoInfo.Lc_Psk = json["cname"].ToString();
                            eSVideoInfo.Lc_Psk = json["psk"].ToString();//2021-10-15 PSK字段不能取cname
                        }
                        else if (interphoneTypeEnum == InterphoneType.HDL.ToString())
                        {
                            try
                            {
                                var pushTime = json["pushTime"];
                                if (pushTime == null)
                                {
                                    return;
                                }
                                if (!string.IsNullOrEmpty(pushTime.ToString()))
                                {
                                    var pushDateTime = Utlis.UnixToDateTimeMS(Convert.ToInt64(pushTime));
                                    if (pushDateTime.AddSeconds(30) < DateTime.Now)
                                    {
                                        return;
                                    }
                                }
                            }
                            catch { }
                            //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();
                            eSVideoInfo.spk = json["spk"].ToString();
                            //ShowAlert("狄耐克门口机呼叫");
                            //打开呼叫页面
                            HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.HDL.ToString());
                            return;
                        }
                        else if (interphoneTypeEnum == InterphoneType.FREEVIEW.ToString())
                        {
                            //全视通 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();
                            eSVideoInfo.spk = json["spk"].ToString();
                            //ShowAlert("狄耐克门口机呼叫");
                            //打开呼叫页面
                            HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.FREEVIEW.ToString());
                            return;
                        }
                        //3.打开呼叫页面
                        if (eSVideoInfo == null) return;
                        ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, interphoneTypeEnum);
                    }
                    else if (jpushMessageInfo.messageType == (PushMessageType.Prompt.ToString()))
                    {
                        ShowAlarmPushMessage(jpushMessageInfo, false);
@@ -487,8 +384,6 @@
                    UserInfo.Current.SaveUserInfo();
                    DB_ResidenceData.Instance.EixtAccount();
                    MainPage.Log("退出账号清空数据");
                    //4.注销HDLSIP账号登录 2021-08-20
                    HDLLinphone.Current.LogoutAllAccount();
                    MainPage.Log("注销HDLSIP账号登录");
#if __IOS__