xm
2021-12-01 6d73bf6e816570291865674bef8bce8972e4de3f
HDL_ON/Common/ApiUtlis.cs
@@ -56,7 +56,9 @@
            return result;
        }
        /// <summary>
        /// 下载数据完成标记
        /// </summary>
        public bool DownloadDataComplete = true;
        /// <summary>
        /// 下载数据
@@ -168,7 +170,7 @@
                            for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
                            {
                                var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
                                if (localFunction.Spk_Prefix == FunctionCategory.Music || string.IsNullOrEmpty(localFunction.Spk_Prefix))
                                if (SPK.MusicSpkList().Contains(localFunction.spk))
                                {
                                    i++;
                                    continue;
@@ -263,6 +265,7 @@
                    //}
                    //======================获取可视对讲设备列表====================
                    bool isInterphoneType_HDL = false;//是否为HDLLinphone可视对讲
                    var videoInfo= VideoSend.GetVideoInfoList();
                    if (videoInfo.Code == StateCode.SUCCESS)
                    {
@@ -274,19 +277,33 @@
                            if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString())
                            {
                                UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
                            }
                            else if(video.interphoneType == InterphoneType.HDL.ToString())
                            {
                            } else if (video.interphoneType == InterphoneType.HDL.ToString()) {
                                isInterphoneType_HDL = true;
                                DB_ResidenceData.Instance.SupportFacePass = true;
                                DB_ResidenceData.Instance.SaveResidenceData();
                                DB_ResidenceData.Instance.SaveResidenceData();
                            }
                        }
                    }
                    //======================获取Sip账号并且初始化SDK可视对讲设备列表====================
                    //如果检测线程没启动,才继续下面操作 因为App有可能刚启动马上收到推送了,然后才执行到这里
                    if (HDLLinphone.Current.CheckIncomingCallThreadIsNull()) {
                        //当前住宅是HDL可视对讲类型的设备
                        if (isInterphoneType_HDL)
                        {
                            //HDLLinphone可视对讲,获取Sip账号并初始化SDK
                            HDLLinphone.Current.GetHDLSipInfoAndInitSDK(DB_ResidenceData.Instance.CurrentRegion.id);
                        }
                        else
                        {
                            Utlis.WriteLine("当前住宅不支持HDL可视对讲,退出登录所有账号");
                            //当前住宅不支持HDL可视对讲
                            HDLLinphone.Current.LogoutAllAccount();
                        }
                    }
                    //======================安防====================
                    GetSecurityList();
                    //======================SIP账号====================
                }
                catch (Exception ex)
@@ -359,6 +376,7 @@
                        //重新连接mqtt
                        DAL.Mqtt.MqttClient.DisConnectRemote("刷新数据,重连mqtt",false);
                        #endregion
                    }
                }
            })