wxr
2021-07-05 6b7a07bcbe147be7ed64994c40bcc5b0a2042aae
HDL_ON/Common/ApiUtlis.cs
@@ -4,6 +4,8 @@
using HDL_ON.DAL;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.UI.UI2.FuntionControlView.Video;
using Newtonsoft.Json;
using Shared;
namespace HDL_ON.Common
@@ -106,6 +108,26 @@
                }
                endTime = DateTime.Now.AddSeconds(5);
                MainPage.Log($"刷新个人信息成功");
                //int count = 0;
                //while (count < 10)
                //{
                //    if (DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
                //    {
                //        System.Threading.Thread.Sleep(200);
                //    }
                //    else
                //    {
                //        break;
                //    }
                //    count++;
                //}
                //if (DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
                //{
                //    return;
                //}
                try
                {
                    //===================房间=======================
@@ -229,15 +251,31 @@
                        MainPage.Log($"读取云端场景数据失败:Code:{pack.Code}; Msg:{pack.message}");
                    }
                    //===================读取安防列表==========================
                    GetSecurityList();
                    //===================读取逻辑列表==========================
                    UI.UI2.Intelligence.Automation.MainView.GetLogicList();
                    //===================读取可视对讲数据==========================
                    var flVideoInfo = HttpRequest.CheckFlVideo();
                    if(flVideoInfo.Code == StateCode.SUCCESS)
                    //判断是否有可视对讲数据,有则显示可视对讲icon
                    //var flVideoInfo = HttpRequest.CheckFlVideo();
                    //if(flVideoInfo.Code == StateCode.SUCCESS)
                    //{
                    //    FunctionList.List.videoIntercom1111 = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString());
                    //}
                    //======================获取可视对讲设备列表====================
                    var videoInfo= VideoSend.GetVideoInfoList();
                    if (videoInfo.Code == StateCode.SUCCESS)
                    {
                        FunctionList.List.videoIntercom = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString());
                        string videoList = videoInfo.Data.ToString();
                        FunctionList.List.videoIntercom = JsonConvert.DeserializeObject<List<UI.UI2.FuntionControlView.Video.Video>>(videoList);
                        foreach (var video in FunctionList.List.videoIntercom)
                        {
                            if (video.interphoneType == "IMOUVISIAL")
                            {
                                UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
                            }
                        }
                    }
                }