From 8cf6ab121d1cca81973de1a4cbe387c1a4a8308a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 15 三月 2023 11:04:48 +0800
Subject: [PATCH] 人脸管理完成,缺个更新人脸返回
---
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 91 +++++++++++++++++++++++++++++++++------------
1 files changed, 66 insertions(+), 25 deletions(-)
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index 45144a9..0a872aa 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -64,13 +64,13 @@
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
break;
case SPK.CurtainRoller:
- var rollingShutterView = new VenetianBlindsPage(function);
+ var rollingShutterView = new RollingShutterPage(function);
MainPage.BasePageView.AddChidren(rollingShutterView);
rollingShutterView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
break;
case SPK.CurtainShades:
- var curtainShadesView = new RollingShutterPage(function);
+ var curtainShadesView = new VenetianBlindsPage(function);
MainPage.BasePageView.AddChidren(curtainShadesView);
curtainShadesView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
@@ -233,38 +233,79 @@
doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
break;
case SPK.IpCam_Imou:
- new System.Threading.Thread(() =>
+#if __IOS__
+#else
+ FunctionList.List.GetIpCamImouList();
+ if (string.IsNullOrEmpty(Com.Utils.HdlToLcUtils.Instance.SubAccessToken))
{
- var http = new HttpServerRequest();
- var pack = http.GetLcSubAccountToken();
- if (pack.Code == StateCode.SUCCESS)
+ var waitPage = new Loading();
+ MainPage.BaseView.AddChidren(waitPage);
+ waitPage.Start("");
+ new System.Threading.Thread(() =>
{
- if (pack.Data == null || string.IsNullOrEmpty(pack.Data.ToString()))
+ try
+ {
+ var http = new HttpServerRequest();
+ var pack = http.GetLcSubAccountToken();
+ if (pack.Code == StateCode.SUCCESS)
+ {
+ if (pack.Data == null || string.IsNullOrEmpty(pack.Data.ToString()))
+ {
+ Application.RunOnMainThread(() =>
+ {
+ new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao));
+ });
+ }
+ Application.RunOnMainThread(() =>{
+ try
+ {
+ Com.Utils.HdlToLcUtils.Instance.SubAccessToken = pack.Data.ToString();
+ Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
+ }
+ catch (Exception ex)
+ {
+
+ }
+ });
+ }
+ else
+ {
+ Application.RunOnMainThread(() =>
+ {
+ new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), Language.StringByID(StringId.huoqushujushibao) + $"({pack.Code})");
+ });
+ }
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log("鍔犺浇涔愭鎽勫儚澶村紓甯�");
+ }
+ finally
{
Application.RunOnMainThread(() =>
{
- new PublicAssmebly().TipMsg("", $"鑾峰彇涔愭鏁版嵁澶辫触");
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
- Com.Utils.HdlToLcUtils.Instance.InitData(Shared.Application.Activity, "HDL-HOME-APP-TEST", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", OnAppConfig.Instance.RequestHttpsHost);
- 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();
- Application.RunOnMainThread(() =>
- {
- //Com.Utils.HdlToLcUtils.Instance.OpenActivity();
- Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId,function.name);
- });
- }
- else
+ })
+ { IsBackground = true }.Start();
+ }
+ else
+ {
+ try
{
- Application.RunOnMainThread(() =>
- {
- new PublicAssmebly().TipMsg("", $"鑾峰彇涔愭鏁版嵁澶辫触({pack.Code})");
- });
+ Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId, function.name);
}
- })
- { IsBackground = true }.Start();
+ catch (Exception ex)
+ {
+
+ }
+ }
+#endif
break;
}
};
--
Gitblit v1.8.0