wxr
2022-12-07 03d8399009aacc15efde15f08e37893e47dc2427
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -234,7 +234,8 @@
                        break;
                    case SPK.IpCam_Imou:
                        FunctionList.List.GetIpCamImouList();
                        if (string.IsNullOrEmpty(Com.Utils.HdlToLcUtils.Instance.SubAccessToken))
                        {
                        var waitPage = new Loading();
                        MainPage.BaseView.AddChidren(waitPage);
                        waitPage.Start("");
@@ -250,7 +251,7 @@
                                    {
                                        Application.RunOnMainThread(() =>
                                        {
                                            new PublicAssmebly().TipMsg("", $"获取乐橙数据失败");
                                                new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao));
                                        });
                                    }
#if __ANDROID__
@@ -258,8 +259,6 @@
                                    {
                                        try
                                        {
                                            Com.Utils.HdlToLcUtils.Instance.HomeId = DB_ResidenceData.Instance.CurrentRegion.id;
                                            Com.Utils.HdlToLcUtils.Instance.Token = UserInfo.Current.AccessToken;
                                            Com.Utils.HdlToLcUtils.Instance.SubAccessToken = pack.Data.ToString();
                                            Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
                                        }
@@ -274,16 +273,18 @@
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        new PublicAssmebly().TipMsg("", $"获取乐橙数据失败({pack.Code})");
                                            new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao) + $"({pack.Code})");
                                    });
                                }
                            }catch(Exception ex)
                                }
                                catch (Exception ex)
                            {
                                MainPage.Log("加载乐橙摄像头异常");
                            }
                            finally
                            {
                                Application.RunOnMainThread(() => {
                                    Application.RunOnMainThread(() =>
                                    {
                                    if (waitPage != null)
                                    {
                                        waitPage.RemoveFromParent();
@@ -293,6 +294,18 @@
                            }
                        })
                        { IsBackground = true }.Start();
                        }
                        else
                        {
                            try
                            {
                                Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
                            }
                            catch (Exception ex)
                            {
                            }
                        }
                        break;
                }
            };