From 02a194a40228251fef82dbca6c7687263b55b0b9 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 13 四月 2023 14:36:44 +0800
Subject: [PATCH] 2023年04月13日14:33:48

---
 HDL-ON_Android/SplashActivity.cs                                  |   23 ++++-------
 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs    |    8 ++--
 HDL_ON/Common/HDLCommon.cs                                        |    2 +
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs    |   32 +++++++++------
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs |    7 ++-
 HDL-ON_iOS/AppDelegate.cs                                         |    2 
 HDL-ON_Android/Application.cs                                     |    4 ++
 HDL-ON_Android/Other/JPush/JPushReceiver.cs                       |   18 +++++++--
 8 files changed, 56 insertions(+), 40 deletions(-)

diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index 3805c35..c5b0a2c 100644
--- a/HDL-ON_Android/Application.cs
+++ b/HDL-ON_Android/Application.cs
@@ -38,6 +38,10 @@
         public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { }
         public override void OnCreate()
         {
+
+           
+
+
             if (Shared.Application.Activity != null)
             {
                 //reStartApp(this);
diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
index e7cfbd3..fdd0833 100644
--- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs
+++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -34,6 +34,8 @@
         /// <param name="notificationMessage"></param>
         public override void OnNotifyMessageOpened(Context context, NotificationMessage notificationMessage)
         {
+
+            
             //2020-12-23 瑙e喅鐐瑰嚮閫氱煡鏍忔墦寮�涓嶄簡APP闂
             //base.OnNotifyMessageOpened(context, notificationMessage);
             OpenNotification(context, notificationMessage);
@@ -146,9 +148,18 @@
                 Utlis.WriteLine("PushMes extras : " + pushMes.Extras);
                 Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId);
 
-                Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
-                i.SetFlags(ActivityFlags.NewTask);
-                context.StartActivity(i);
+                if (Shared.Application.Activity==null)
+                {
+                    Intent i = new Intent(context, typeof(SplashActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
+                    i.SetFlags(ActivityFlags.NewTask);
+                    context.StartActivity(i);
+                }
+                else
+                {
+                    Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
+                    i.SetFlags(ActivityFlags.NewTask);
+                    context.StartActivity(i);
+                }
                 //瑙f瀽msg
                 AdjustPushMessage(pushMes);
             }
@@ -160,7 +171,6 @@
 
         public static void AdjustPushMessage(JPushMessageInfo pushMes)
         {
-
             new System.Threading.Thread(new System.Threading.ThreadStart(() =>
             {
                 while (MainPage.BasePageView == null)
diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs
index 7b9abca..4271cff 100644
--- a/HDL-ON_Android/SplashActivity.cs
+++ b/HDL-ON_Android/SplashActivity.cs
@@ -16,7 +16,7 @@
 
 namespace HDL_ON_Android
 {
-    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity",ScreenOrientation = ScreenOrientation.Portrait) ]
+    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTask, Name = "com.hdl.onpro.SplashActivity", ScreenOrientation = ScreenOrientation.Portrait)]
     [IntentFilter(new string[] { "com.hdl.onpro.SplashActivity", Intent.ActionView })]
     public class SplashActivity : Activity
     {
@@ -46,21 +46,16 @@
         {
             base.OnCreate(savedInstanceState);
 
-          
-
             //Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
             //StartActivityForResult(i, 1);
             //OverridePendingTransition(0, 0);
             //initAll();
-
-
-
             if (HDL_ON.OnAppConfig.Instance.FirstRunApp || !HDL_ON.OnAppConfig.Instance.isAgreePrivacyPolicy)
             {
                 Language.CurrentLanguage = "Chinese";
                 Locale locale1 = Locale.Default;
                 var localeList = Resources.Configuration.Locale;
-                Console.WriteLine("褰撳墠璇█缂╁啓:"+localeList.Language);
+                Console.WriteLine("褰撳墠璇█缂╁啓:" + localeList.Language);
                 if (localeList.Language == "zh")
                 {
                     Language.CurrentLanguage = "Chinese";
@@ -83,7 +78,7 @@
                 }
 
                 Intent intent = new Intent(this, typeof(AgreementActivity));
-                StartActivityForResult(intent,99);
+                StartActivityForResult(intent, 99);
             }
             else
             {
@@ -95,7 +90,6 @@
                 initOhterSdk();
                 Finish();//鍏抽棴鑷繁
             }
-
         }
 
         void initOhterSdk()
@@ -170,12 +164,12 @@
                 Language.CurrentLanguage = "Chinese";
                 Locale locale1 = Locale.Default;
                 var localeList = Resources.Configuration.Locale;
-                Console.WriteLine("褰撳墠璇█缂栧彿"+ localeList.Language);
+                Console.WriteLine("褰撳墠璇█缂栧彿" + localeList.Language);
                 if (localeList.Language == "zh")
                 {
                     Language.CurrentLanguage = "Chinese";
                 }
-                else if(localeList.Language == "es")
+                else if (localeList.Language == "es")
                 {
                     Language.CurrentLanguage = "Spanish";
                 }
@@ -207,7 +201,7 @@
                     //}
                     //else
                     //{
-                        //Console.WriteLine("HHH 缃戠粶鍙樺寲浣嗗浜庡悗鍙�"+internetStatus);
+                    //Console.WriteLine("HHH 缃戠粶鍙樺寲浣嗗浜庡悗鍙�"+internetStatus);
                     //}
 
                     //缃戠粶鍙樺寲澶勭悊
@@ -333,7 +327,7 @@
         }
 
         public static bool IsShowTip = true;
- 
+
         void checkSomeInfo()
         {
             try
@@ -390,9 +384,8 @@
             return false;
         }
 
+
     }
 
-
-    
 
 }
\ No newline at end of file
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index af7af24..d735acc 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -397,7 +397,7 @@
                         UserInfo.Current.pushMessageInfo = pushMes;
                         UserInfo.Current.inCall = DateTime.Now;
                     }
-
+                    
                     if (bFinishedLaunching)
                     {
                         if (pushMes.Extras != null)
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index d81fca1..b85e591 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -258,6 +258,8 @@
         {
             try
             {
+               
+
                 //Extras涓虹┖涓嶅鐞�
                 if (string.IsNullOrEmpty(jpushMessageInfo.Extras)) return;
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index ea5a613..18e1a35 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -1142,7 +1142,7 @@
                     {
 
                         loading.Hide();
-                        string stateValue = btnState.Tag == null ? "" : btnState.Tag.ToString();
+                        string stateValue = btnState.Text == null ? "" : btnState.Text.ToString();
                         PublicInterface publicInterface = new PublicInterface();
                         publicInterface.MultiSelectShow(this, faceIdList, device.name, stateValue, (indexeList) =>
                         {
@@ -1158,8 +1158,9 @@
                                         continue;
                                     }
                                     var face = faceIdList[indexe];
-                                    //鏁版嵁灏佽
-                                    AddDictionary("open_user", face.userId, "string");
+
+                                    //鏁版嵁灏佽<楂樿儨璇磋悿鐭抽偅杈规槸鎺ㄩ�佺敤鎴峰悕>
+                                    AddDictionary("open_user", face.userName, "string");
                                     s += face.userName;
                                     s += ",";
                                     tag += face.userId;
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index be9b2c6..7055171 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -414,12 +414,15 @@
                                         for (int b = 0; b < dicList.Count; b++)
                                         {
                                             var dic = dicList[b];
-                                            var userId = dic["value"].ToString();
-                                            var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
-                                            s += FaceItem.userName;
+                                            //var userId = dic["value"].ToString();
+                                            //var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
+                                            //s += FaceItem.userName;
+                                            //s += ",";
+                                            //tag += FaceItem.userId;
+                                            //tag += "_";
+                                            var userName = dic["value"].ToString();
+                                            s += userName;
                                             s += ",";
-                                            tag += FaceItem.userId;
-                                            tag += "_";
                                         }
                                         inputView.btnState.Text = s;
                                     }
@@ -445,10 +448,10 @@
                                                 var FaceItem = this.GetFaceItem(userId, device.deviceId);
                                                 s += FaceItem.userName;
                                                 s += ",";
+
+
                                             }
-                                            //string userId = this.GetKeyValue("user_id",dicList);
-                                            //var FaceItem = this.GetFaceItem(userId, device.deviceId);
-                                            //inputView.btnState.Text = FaceItem.userName;
+                                           
                                         }
                                         inputView.btnState.Text = s;
                                     }
@@ -2170,12 +2173,15 @@
                         for (int b = 0; b < dicList.Count; b++)
                         {
                             var dic = dicList[b];
-                            var userId = dic["value"].ToString();
-                            var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
-                            s += FaceItem.userName;
+                            //var userId = dic["value"].ToString();
+                            //var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
+                            //s += FaceItem.userName;
+                            //s += ",";
+                            //tag += FaceItem.userId;
+                            //tag += "_";
+                            var userName = dic["value"].ToString();
+                            s += userName;
                             s += ",";
-                            tag += FaceItem.userId;
-                            tag += "_";
                         }
                         button1.Text = s;
                         button1.Tag = tag;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
index 5bc4b2f..e9cb4c6 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -234,10 +234,10 @@
                         }
 
                         string appKey = "1aa98a90489b4838b966b57018b4b04b";//姝e紡鏈嶅姟鍣�
-                        if (OnAppConfig.Instance.RequestHttpsHost == "https://test-gz.hdlcontrol.com")
-                        {
-                            appKey = "941b1b72b6294998acfd36c14931b675";//鐢ㄥ湪娴嬭瘯鏈嶅姟鍣ㄦ帹閫佺殑
-                        }
+                        //if (OnAppConfig.Instance.RequestHttpsHost == "https://test-gz.hdlcontrol.com")
+                        //{
+                        //    appKey = "941b1b72b6294998acfd36c14931b675";//鐢ㄥ湪娴嬭瘯鏈嶅姟鍣ㄦ帹閫佺殑
+                        //}
 
 
 #if __IOS__

--
Gitblit v1.8.0