From a3b92962f31cb3bbebaba37475b3a8417831520f Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 23 九月 2021 15:30:29 +0800
Subject: [PATCH] 合并嘉乐本地加密代码

---
 HDL_ON/Common/Constant.cs                                       |    6 
 HDL_ON/DAL/DriverLayer/Control_TcpServer.cs                     |    2 
 HDL-ON_Android/Assets/Language.ini                              |    2 
 HDL-ON_iOS/HDL-ON_iOS.csproj                                    |    2 
 HDL-ON_iOS/Resources/Phone/Collection/MesCenter/PropertyOn.png  |    0 
 HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs                    |   56 ++++
 DLL/Shared.Droid.xml                                            |   11 +
 HDL-ON_iOS/Resources/Phone/Collection/MesCenter/Property.png    |    0 
 HDL_ON/DAL/DriverLayer/Control_Udp.cs                           |    2 
 HDL-ON_Android/Assets/Phone/Collection/MesCenter/Property.png   |    0 
 HDL_ON/Entity/Device/DeviceModule.cs                            |    9 
 DLL/Shared.IOS.xml                                              |    6 
 HDL-ON_Android/Assets/Phone/Collection/MesCenter/PropertyOn.png |    0 
 HDL-ON_Android/HDL-ON_Android.csproj                            |    2 
 DLL/Shared.IOS.dll                                              |    0 
 HDL-ON_iOS/Resources/Language.ini                               |    2 
 HDL_ON/DAL/Server/NewAPI.cs                                     |   27 ++
 HDL_ON/DAL/Server/NewApiRes.cs                                  |   13 +
 HDL_ON/DAL/Server/HttpUtil.cs                                   |   18 
 HDL_ON/Common/R.cs                                              |    5 
 HDL_ON/DAL/Server/HttpServerRequest.cs                          |   81 ++++---
 HDL_ON/DAL/DriverLayer/Control.cs                               |  108 +++++++++-
 HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs                   |    4 
 HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs                   |  231 +++++++++++++++++++---
 24 files changed, 484 insertions(+), 103 deletions(-)

diff --git a/DLL/Shared.Droid.xml b/DLL/Shared.Droid.xml
index 3dc8941..f2014e5 100644
--- a/DLL/Shared.Droid.xml
+++ b/DLL/Shared.Droid.xml
@@ -1311,6 +1311,11 @@
             鐐瑰嚮寮硅捣浜嬩欢
             </summary>
         </member>
+        <member name="F:Shared.View.MouseUpOutsideEventHandler">
+            <summary>
+            鐐瑰嚮寮硅捣浜嬩欢 UpOutside
+            </summary>
+        </member>
         <member name="F:Shared.View.MouseLongEventHandler">
             <summary>
             闀挎寜鐐瑰嚮浜嬩欢
@@ -4323,6 +4328,12 @@
             鍔犺浇鏈湴HTML
             </summary>
         </member>
+        <member name="M:Shared.WebView.LoadHTMLString(System.String)">
+            <summary>
+            鍔犺浇Html鏍囩鐨勫瘜鏂囨湰
+            </summary>
+            <param name="htmlStr"></param>
+        </member>
         <member name="T:Shared.WebView.MyWebViewClient">
             <summary>
             MyWebViewClient
diff --git a/DLL/Shared.IOS.dll b/DLL/Shared.IOS.dll
index 36127be..bcbf111 100644
--- a/DLL/Shared.IOS.dll
+++ b/DLL/Shared.IOS.dll
Binary files differ
diff --git a/DLL/Shared.IOS.xml b/DLL/Shared.IOS.xml
index 04be6ae..76c018c 100644
--- a/DLL/Shared.IOS.xml
+++ b/DLL/Shared.IOS.xml
@@ -1720,6 +1720,12 @@
             鍔犺浇鏈湴HTML
             </summary>
         </member>
+        <member name="M:Shared.WebView.LoadHTMLString(System.String)">
+            <summary>
+            鍔犺浇Html鏍囩鐨勫瘜鏂囨湰
+            </summary>
+            <param name="htmlStr"></param>
+        </member>
         <member name="T:Shared.WebView.OnWKNavigationDelegate">
             <summary>
             OnWKNavigationDelegate
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 6b2bf94..cbf3a84 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1082,6 +1082,7 @@
 9066=Remarks
 9067=Remarks cannot be blank.
 9068=Do you want to unbind?
+9069=Property notice
     
 10000=Invalid password, please log in again.
 10001=Fail to request server, please try again later.
@@ -2181,6 +2182,7 @@
 9066=澶囨敞
 9067=澶囨敞涓嶈兘涓虹┖
 9068=鏄惁瑙i櫎缁戝畾锛�
+9069=鐗╀笟閫氱煡
  
 10000=鏃犳晥鐧诲綍瀵嗛挜锛岃閲嶆柊鐧诲綍锛�
 10001=璇锋眰鏈嶅姟鍣ㄥけ璐ワ紝璇风◢鍚庡啀璇曪紒
diff --git a/HDL-ON_Android/Assets/Phone/Collection/MesCenter/Property.png b/HDL-ON_Android/Assets/Phone/Collection/MesCenter/Property.png
new file mode 100644
index 0000000..6304c84
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/Collection/MesCenter/Property.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/Collection/MesCenter/PropertyOn.png b/HDL-ON_Android/Assets/Phone/Collection/MesCenter/PropertyOn.png
new file mode 100644
index 0000000..9eab09d
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/Collection/MesCenter/PropertyOn.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 737fee6..baeed72 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -499,6 +499,8 @@
     <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
     <AndroidAsset Include="Assets\Phone\LogicIcon\security.png" />
     <AndroidAsset Include="Assets\Phone\Public\HookIcon.png" />
+    <AndroidAsset Include="Assets\Phone\Collection\MesCenter\Property.png" />
+    <AndroidAsset Include="Assets\Phone\Collection\MesCenter\PropertyOn.png" />
   </ItemGroup>
   <ItemGroup>
     <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" />
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index d714047..1ea9ff9 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1351,6 +1351,8 @@
       <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" />
       <BundleResource Include="Resources\Phone\LogicIcon\security.png" />
       <BundleResource Include="Resources\Phone\Public\HookIcon.png" />
+      <BundleResource Include="Resources\Phone\Collection\MesCenter\Property.png" />
+      <BundleResource Include="Resources\Phone\Collection\MesCenter\PropertyOn.png" />
     </ItemGroup>
     <ItemGroup>
       <ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 6b2bf94..cbf3a84 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1082,6 +1082,7 @@
 9066=Remarks
 9067=Remarks cannot be blank.
 9068=Do you want to unbind?
+9069=Property notice
     
 10000=Invalid password, please log in again.
 10001=Fail to request server, please try again later.
@@ -2181,6 +2182,7 @@
 9066=澶囨敞
 9067=澶囨敞涓嶈兘涓虹┖
 9068=鏄惁瑙i櫎缁戝畾锛�
+9069=鐗╀笟閫氱煡
  
 10000=鏃犳晥鐧诲綍瀵嗛挜锛岃閲嶆柊鐧诲綍锛�
 10001=璇锋眰鏈嶅姟鍣ㄥけ璐ワ紝璇风◢鍚庡啀璇曪紒
diff --git a/HDL-ON_iOS/Resources/Phone/Collection/MesCenter/Property.png b/HDL-ON_iOS/Resources/Phone/Collection/MesCenter/Property.png
new file mode 100644
index 0000000..6304c84
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/Collection/MesCenter/Property.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/Collection/MesCenter/PropertyOn.png b/HDL-ON_iOS/Resources/Phone/Collection/MesCenter/PropertyOn.png
new file mode 100644
index 0000000..9eab09d
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/Collection/MesCenter/PropertyOn.png
Binary files differ
diff --git a/HDL_ON/Common/Constant.cs b/HDL_ON/Common/Constant.cs
index 06fb199..d4080b3 100644
--- a/HDL_ON/Common/Constant.cs
+++ b/HDL_ON/Common/Constant.cs
@@ -244,7 +244,11 @@
         /// <summary>
         /// 鐗╀笟閫氱煡锛屽緟纭淇敼
         /// </summary>
-        Property,
+        IMOU_VISAAL,
+        /// <summary>
+        /// 鐗╀笟閫氱煡
+        /// </summary>
+        Notice,
     }
 
     /// <summary>
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 8d6c7bd..6c5c10f 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -2892,7 +2892,10 @@
         /// 鏄惁瑙i櫎缁戝畾锛�
         /// </summary>
         public const int DoYouWantToUnbind = 9068;
-
+        /// <summary>
+        /// 鐗╀笟閫氱煡
+        /// </summary>
+        public const int Propertynotice = 9069;
 
 
         #region 缃戠粶璇锋眰鍝嶅簲閿欒鎻愮ず淇℃伅
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 0efa582..04eb714 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -63,7 +63,19 @@
         /// 鏄惁鎼滅储鏈湴缃戝叧鎴愬姛
         /// </summary>
         public bool IsSearchLocalGatewaySuccessful = false;
-      
+        /// <summary>
+        /// 鏄惁鏈湴鍔犲瘑锛岀洰鍓嶅彧瀵笰缃戝叧鏈夌敤
+        /// </summary>
+        public bool IsLocalEncrypt;
+        /// <summary>
+        /// 鍒ゆ柇鏄惁鏈湴鍔犲瘑骞朵笖鍔犲瘑key涓嶄负绌�
+        /// </summary>
+        public bool IsLocalEncryptAndGetAesKey {
+            get {
+                return IsLocalEncrypt && (!string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.localSecret));
+            }
+        }
+
         bool _GatewayOnline_Local = false;
         /// <summary>
         /// 缃戝叧鍦ㄧ嚎-灞�鍩熺綉
@@ -689,15 +701,45 @@
         /// <summary>
         /// 杞崲鍙戦�佹暟鎹�
         /// </summary>
-        public byte[] ConvertSendBodyData(string topic, string bodyDataString)
+        /// <param name="topic">涓婚</param>
+        /// <param name="bodyDataString">body鍐呭鏁版嵁</param>
+        /// <param name="isEncryption">鏄惁瑕佸body鍔犲瘑</param>
+        /// <returns></returns>
+        public byte[] ConvertSendBodyData(string topic, string bodyDataString, bool isEncryption = true)
         {
-            string topicString = "Topic:" + topic + "\r\n";
-            byte[] bodyBytes = Encoding.ASCII.GetBytes(bodyDataString);
-            string lengthString = "Length:" + bodyBytes.Length.ToString() + "\r\n" + "\r\n";
+            //string topicString = "Topic:" + topic + "\r\n";
+            //byte[] bodyBytes = Encoding.ASCII.GetBytes(bodyDataString);
+            //string lengthString = "Length:" + bodyBytes.Length.ToString() + "\r\n" + "\r\n";
 
-            string sendDataString = topicString + lengthString + bodyDataString;
-            byte[] sendDataBytes = Encoding.ASCII.GetBytes(sendDataString);
-            MainPage.Log($"杞崲HDL-Link鏁版嵁\r\n{sendDataString}\r\n");
+            //string sendDataString = topicString + lengthString + bodyDataString;
+            //byte[] sendDataBytes = Encoding.ASCII.GetBytes(sendDataString);
+            //MainPage.Log($"杞崲HDL-Link鏁版嵁\r\n{sendDataString}\r\n");
+
+            //***************************************************************
+            //2021-09-23 澧炲姞鏈湴閫氫俊鍔犲瘑澶勭悊
+            //1.鎷兼帴澶�
+            string topicString = "Topic:" + topic + "\r\n";
+            //2.Body瀛楃涓茶浆涓篵yte鏁扮粍
+            byte[] bodyBytes = Encoding.ASCII.GetBytes(bodyDataString);
+            //鍒ゆ柇鏄惁闇�鍔犲瘑Body鏁版嵁
+            if (isEncryption && IsLocalEncryptAndGetAesKey)
+            {
+                bodyBytes = Securitys.EncryptionService.AesEncryptPayload(bodyBytes, DB_ResidenceData.Instance.CurrentRegion.localSecret);
+                //bodyDataString = Encoding.UTF8.GetString(bodyBytes);
+                //MainPage.Log($"杞崲HDL-Link鏁版嵁 鍔犲瘑key锛�" + DB_ResidenceData.Instance.CurrentRegion.localSecret);
+            }
+            //3.鎷兼帴body鐨凩ength闀垮害鏁版嵁
+            string lengthString = "Length:" + bodyBytes.Length.ToString() + "\r\n" + "\r\n";
+            string topicAndLengthString = topicString + lengthString;
+            byte[] topicAndLengthBytes = Encoding.ASCII.GetBytes(topicAndLengthString);
+            //4.鎷兼帴鍚堝苟 Topic 鍜� body鐨刡yte鏁扮粍鏁版嵁
+            byte[] sendDataBytes = new byte[topicAndLengthBytes.Length + bodyBytes.Length];
+            topicAndLengthBytes.CopyTo(sendDataBytes, 0);
+            bodyBytes.CopyTo(sendDataBytes, topicAndLengthBytes.Length);
+
+            //var sendDataString = Encoding.UTF8.GetString(sendDataBytes);
+            //MainPage.Log($"杞崲HDL-Link鏁版嵁\r\n{sendDataString}\r\n");
+            //***************************************************************
 
             return sendDataBytes;
         }
@@ -708,15 +750,19 @@
         public void ConvertReceiveData(byte[] receiveBytes)
         {
             var reString = Encoding.UTF8.GetString(receiveBytes);
-            AnalysisReceiveData(reString);
+            AnalysisReceiveData(reString, receiveBytes);
         }
         /// <summary>
         /// 杞崲鎺ユ敹鍒扮殑鏁版嵁
         /// </summary>
+        /// <param name="receiveString">杞琒tring鍚庣殑鏁版嵁</param>
+        /// <param name="originalReceiveBytes"鍘熷Bytes鏁版嵁</param>
         /// <returns></returns>
-        public LocalCommunicationData AnalysisReceiveData(string receiveString)
+        public LocalCommunicationData AnalysisReceiveData(string receiveString, byte[] originalReceiveBytes)
         {
             LocalCommunicationData receiveObj = new LocalCommunicationData();
+
+            MainPage.Log($"灞�鍩熺綉淇℃伅: \r\n{receiveString}");
 
             var res = receiveString.Split("\r\n\r\n");
 
@@ -738,8 +784,7 @@
                     }
                 }
 
-                MainPage.Log($"灞�鍩熺綉淇℃伅: {receiveObj.Topic}  : 鍐呭: {res[1]}");
-
+                //MainPage.Log($"灞�鍩熺綉淇℃伅: {receiveObj.Topic}  : 鍐呭: {res[1]}");
 
                 //楠岃瘉鏈夋晥鏁版嵁闀垮害
                 //if (res[1].Length != receiveObj.Length)
@@ -748,6 +793,40 @@
                 //    return receiveObj;
                 //}
                 receiveObj.BodyDataString = res[1];
+
+                //2021-09-23 杩囨护涓嶉渶瑕佽В瀵嗙殑涓婚 鐩墠鎼滅储缃戝叧涓婚涓嶅姞瀵�
+                if (receiveObj.Topic != CommunicationTopic.SearchLoaclGatewayReply)
+                {
+                    //鍒ゆ柇褰撳墠缃戝叧鏄惁寮�鍚簡鏈湴鍔犲瘑
+                    if (IsLocalEncryptAndGetAesKey)
+                    {
+                        MainPage.Log($"灞�鍩熺綉淇℃伅 寮�濮嬭В瀵�");
+                        if (originalReceiveBytes != null)
+                        {
+                            //鎷垮埌鍘熷Bytes鏁版嵁鍘昏В瀵�
+                            byte[] topicBytes = Encoding.UTF8.GetBytes(res[0]);
+                            byte[] bodyBytes = new byte[receiveObj.Length];
+                            Array.Copy(originalReceiveBytes, topicBytes.Length + 4, bodyBytes, 0, receiveObj.Length);
+                            byte[] receiveBytes = Securitys.EncryptionService.AesDecryptPayload(bodyBytes, DB_ResidenceData.Instance.CurrentRegion.localSecret);
+                            var revString = Encoding.UTF8.GetString(receiveBytes);
+                            receiveObj.BodyDataString = revString;
+                            MainPage.Log($"灞�鍩熺綉淇℃伅: 瑙e瘑鍚庯細" + receiveObj.BodyDataString);
+                        }
+                        else
+                        {
+                            //鐩墠涓嶆嬁鍘熷Bytes鏁版嵁 瑙e瘑涓嶄簡
+                            //byte[] receiveBytes = Encoding.UTF8.GetBytes(res[1]);
+                            //MainPage.Log($"灞�鍩熺綉淇℃伅 receiveBytes {receiveBytes.Length}");
+                            //receiveBytes = Securitys.EncryptionService.AesDecryptPayload(receiveBytes, DB_ResidenceData.Instance.CurrentRegion.localSecret);
+                            //MainPage.Log($"灞�鍩熺綉淇℃伅 瑙e瘑鍚庯細receiveBytes {receiveBytes.Length}");
+                            //var revString = Encoding.UTF8.GetString(receiveBytes);
+                            //receiveObj.BodyDataString = revString;
+                            //MainPage.Log($"灞�鍩熺綉淇℃伅: 瑙e瘑鍚庯細" + receiveObj.BodyDataString);
+                        }
+
+                    }
+                }
+
 
                 if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply || receiveObj.Topic == CommunicationTopic.GatewayBroadcast)
                 {
@@ -772,7 +851,10 @@
                         {
                             Ins.GatewayId = device.device_mac;
                         }
-                        reportIp = device.ip_address;//涓绘挱鍦板潃涔熻兘鎺у埗璁惧//"239.0.168.188";// 
+                        reportIp = device.ip_address;//涓绘挱鍦板潃涔熻兘鎺у埗璁惧//"239.0.168.188";//
+                        //2021-09-23 鏂板鑾峰彇褰撳墠缃戝叧鏄惁鏈湴鍔犲瘑
+                        Ins.IsLocalEncrypt = device.isLocalEncrypt;
+                        //MainPage.Log("缃戝叧鏈湴鍔犲瘑鐘舵�侊細" + device.local_encrypt.ToString());
                     }
                 }
                 else if (receiveObj.Topic == CommunicationTopic.ct.ReadStatus + "_reply" ||
diff --git a/HDL_ON/DAL/DriverLayer/Control_TcpServer.cs b/HDL_ON/DAL/DriverLayer/Control_TcpServer.cs
index 82a2caa..295098b 100644
--- a/HDL_ON/DAL/DriverLayer/Control_TcpServer.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_TcpServer.cs
@@ -182,7 +182,7 @@
         void AnalysisTcpData(Socket socket, string tcpBodyDataString)
         {
             MainPage.Log($"0001 tcpDataString:\r\n {tcpBodyDataString}");
-            var tcpDataObj = Control.Ins.AnalysisReceiveData(tcpBodyDataString);
+            var tcpDataObj = Control.Ins.AnalysisReceiveData(tcpBodyDataString, null);
             if (tcpDataObj.BodyDataString == null)
             {
                 return;
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index 37ee1e3..5707532 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -1128,7 +1128,7 @@
                 var sendJob = new JObject { { "id", Control.Ins.msg_id.ToString() }, { "time_stamp", Utlis.GetTimestamp ()} };
                 var bodyString = JsonConvert.SerializeObject(sendJob);
                 
-                var sendBytes = Control.Ins.ConvertSendBodyData(CommunicationTopic.SearchLoaclGateway, bodyString);
+                var sendBytes = Control.Ins.ConvertSendBodyData(CommunicationTopic.SearchLoaclGateway, bodyString, false);
                 //缁勬挱鍙戦��
                 packet = new Packet(sendBytes, new System.Net.IPEndPoint(System.Net.IPAddress.Parse("239.0.168.188"), 8585));
                 packet.HaveSendCount = 4;
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 32868bd..513ed6e 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1004,7 +1004,15 @@
                     deviceName = OnAppConfig.Instance.PhoneName,
                     deviceType = deviceType,
                     produce = isProduce,
+                    
                 };
+                mAddpushinfoObj.languageType = Utlis.GetPostLanguageType();
+
+#if DEBUG
+                //List<string> communityCodes = new List<string>();
+                //communityCodes.Add("");
+                //mAddpushinfoObj.communityCodes = communityCodes;
+#endif
 
                 //var mAddpushinfoJson = Newtonsoft.Json.JsonConvert.SerializeObject(mAddpushinfoObj);
                 var mAddpushinfoJson = HttpUtil.GetSignRequestJson(mAddpushinfoObj);
@@ -1061,7 +1069,7 @@
             }
             else if (queryType == 4)
             {
-                pushType = PushType.Property.ToString();
+                pushType = PushType.Notice.ToString();
             }
             var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj()
             {
@@ -1198,16 +1206,13 @@
         /// </summary>
         /// <param name="msgId"></param>
         /// <returns></returns>
-        public bool PushSerivceDeleteMessage(string msgId)
+        public bool PushSerivceDeleteMessage(PushMsgIdObj mPushMsgIdObj)
         {
             if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false;
-
+            if (mPushMsgIdObj == null) return false;
             try
             {
-                var requestJson = HttpUtil.GetSignRequestJson(new PushMsgIdObj()
-                {
-                    msgId = msgId
-                });
+                var requestJson = HttpUtil.GetSignRequestJson(mPushMsgIdObj);
 
                 var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Deletepushinfo, requestJson);
                 if (revertObj.Code == StateCode.SUCCESS)
@@ -1266,6 +1271,18 @@
             { IsBackground = true }.Start();
         }
 
+        /// <summary>
+        /// 鑾峰彇鐗╀笟鍏憡璇︽儏
+        /// </summary>
+        /// <param name="noticeId"></param>
+        /// <returns></returns>
+        public ResponsePackNew GetPropertyNoticeDetails(string noticeId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("noticeId", noticeId);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_GetNoticeInfo, requestJson);
+        }
         #endregion
 
         #region 妫�娴嬫洿鏂�
@@ -1286,9 +1303,9 @@
 
 
 
-        #endregion
+#endregion
 
-        #region 鑾峰彇澶╂皵閮ㄥ垎
+#region 鑾峰彇澶╂皵閮ㄥ垎
         /// <summary>
         /// 鑾峰彇鎸囧畾缁忕含搴︾殑鍩庡競淇℃伅
         /// </summary>
@@ -1356,10 +1373,10 @@
             });
         }
 
-        #endregion
+#endregion
 
 
-        #region 澶囦唤閮ㄥ垎
+#region 澶囦唤閮ㄥ垎
         ///// <summary>
         ///// 鑾峰彇浣忓畢澶囦唤鍒楄〃
         ///// </summary>
@@ -1405,11 +1422,11 @@
                 var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(d);
                 var revertObj = RequestHttps("https://developer.hdlcontrol.com/api/UserBackupList", requestJson, true);
                 var jt = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JObject>>(revertObj.ResponseData.ToString());
-                #region 鎭㈠鎴块棿鏁版嵁
+#region 鎭㈠鎴块棿鏁版嵁
 
 
                 GetBackupRoom(jt,loading);
-                #endregion
+#endregion
                
                 Application.RunOnMainThread(() => {
                     loading.Hide();
@@ -1830,10 +1847,10 @@
         }
         */
 
-        #endregion
+#endregion
 
 
-        #region Kaede --璁惧鍔熻兘鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��
+#region Kaede --璁惧鍔熻兘鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��
         /// <summary>
         /// 鑾峰彇璁惧鍒楄〃
         /// </summary>
@@ -2063,9 +2080,9 @@
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectDevice, requestJson);
         }
 
-        #endregion
+#endregion
 
-        #region Kaede --鍦烘櫙鍔熻兘--------------------------
+#region Kaede --鍦烘櫙鍔熻兘--------------------------
         /// <summary>
         /// 鑾峰彇鍦烘櫙鍒楄〃
         /// 鎴块棿ID鍙┖锛岄粯璁ゆ煡璇綇瀹呬笅鎵�鏈夋埧闂�
@@ -2197,9 +2214,9 @@
             var requestJson = HttpUtil.GetSignRequestJson(d);
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectScene, requestJson).Code;
         }
-        #endregion
+#endregion
 
-        #region Kaede --鎴块棿鍔熻兘--------------------------
+#region Kaede --鎴块棿鍔熻兘--------------------------
         /// <summary>
         /// 鑾峰彇鎴块棿鍒楄〃
         /// </summary>
@@ -2274,10 +2291,10 @@
             return pack;
         }
 
-        #endregion
+#endregion
 
 
-        #region Kaede -- 瀹夐槻鎺ュ彛____________________________
+#region Kaede -- 瀹夐槻鎺ュ彛____________________________
         /// <summary>
         /// 鑾峰彇瀹夐槻鍒楄〃
         /// </summary>
@@ -2441,10 +2458,10 @@
             return pack;
         }
 
-        #endregion
+#endregion
 
 
-        #region Kaede --绗笁鏂瑰搧鐗屽姛鑳�--------------------------
+#region Kaede --绗笁鏂瑰搧鐗屽姛鑳�--------------------------
         /// <summary>
         /// 鑾峰彇绗笁鏂瑰搧鐗屽垪琛�
         /// </summary>
@@ -2469,9 +2486,9 @@
             return pack;
         }
 
-        #endregion
+#endregion
 
-        #region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
+#region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
         /// <summary>
         /// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
         /// 2021-07-07 鏂版柟妗堟帴鍙h皟鏁村鎺�
@@ -2484,10 +2501,10 @@
             var requestJson = HttpUtil.GetSignRequestJson(d);
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
         }
-        #endregion
+#endregion
 
 
-        #region 鈻� 鍙瀵硅_________________________
+#region 鈻� 鍙瀵硅_________________________
         /// <summary>
         /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋�
         /// </summary>
@@ -2500,9 +2517,9 @@
             var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson);
             return pack;
         }
-        #endregion
+#endregion
 
-        #region 鈻� 闂ㄩ攣鐩稿叧____________________________
+#region 鈻� 闂ㄩ攣鐩稿叧____________________________
 
         /// <summary>
         /// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍(鎸夋棩鏈熼檷搴�)
@@ -2571,8 +2588,8 @@
             return listSortLog;
         }
 
-        #endregion
-        #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
+#endregion
+#region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
         /// <summary>
         /// 鑾峰彇宸叉巿鏉冪殑闊崇鍒楄〃
         /// </summary>
@@ -2636,7 +2653,7 @@
             var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj);
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson);
         }
-        #endregion
+#endregion
 
 
         /// <summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 67c665d..d2292ee 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -26,7 +26,7 @@
         /// <summary>
         /// 璇锋眰瓒呮椂鏃堕棿
         /// </summary>
-        public const int TIME_OUT = 10;
+        public const int TIME_OUT = 15;
         /// <summary>
         /// 鐗规畩鎺ュ彛璇锋眰瓒呮椂鏃堕棿
         /// </summary>
@@ -50,7 +50,7 @@
         /// <param name="replaceToken"></param>
         /// <param name="mTimeout"></param>
         /// <returns></returns>
-        public static ResponsePackNew RequestHttpsGet(string apiPath, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+        public static ResponsePackNew RequestHttpsGet(string apiPath, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
         {
             return RequestHttps(Method.GET, apiPath, null, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
         }
@@ -67,7 +67,7 @@
         ///// <param name="mTimeout">璇锋眰瓒呮椂鏃堕棿锛岄粯璁�10</param>
         ///// <param name="urlHead"></param>
         ///// <returns></returns>
-        //public static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10, bool needErrorTip = true)
+        //public static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT, bool needErrorTip = true)
         //{
         //    var mResponsePackNew = RequestHttps(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
         //    if (needErrorTip)
@@ -90,7 +90,7 @@
         /// <param name="bodyParameterJson"></param>
         /// <param name="mTimeout"></param>
         /// <returns></returns>
-        public static ResponsePackNew RequestHttpsPostFroHome(string apiPath, string bodyParameterJson, int mTimeout = 10)
+        public static ResponsePackNew RequestHttpsPostFroHome(string apiPath, string bodyParameterJson, int mTimeout = TIME_OUT)
         {
             string urlHead = DB_ResidenceData.Instance.CurrentRegion.regionUrl;
             //var replaceToken = "";
@@ -111,7 +111,7 @@
         /// <param name="replaceToken"></param>
         /// <param name="mTimeout"></param>
         /// <returns></returns>
-        public static ResponsePackNew RequestHttpsPost(string apiPath, string bodyParameterJson, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+        public static ResponsePackNew RequestHttpsPost(string apiPath, string bodyParameterJson, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
         {
             return RequestHttps(Method.POST, apiPath, bodyParameterJson, null, null, urlHead, replaceToken, mTimeout);
         }
@@ -126,7 +126,7 @@
         /// <param name="replaceToken"></param>
         /// <param name="mTimeout"></param>
         /// <returns></returns>
-        public static ResponsePackNew RequestHttpsPost(string apiPath, Dictionary<string, object> queryDictionary, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+        public static ResponsePackNew RequestHttpsPost(string apiPath, Dictionary<string, object> queryDictionary, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
         {
             return RequestHttps(Method.POST, apiPath, null, queryDictionary, null, urlHead, replaceToken, mTimeout);
         }
@@ -143,7 +143,7 @@
         /// <param name="replaceToken"></param>
         /// <param name="mTimeout"></param>
         /// <returns></returns>
-        static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+        static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
         {
             //Dome妯″紡鐧诲綍
 
@@ -258,7 +258,7 @@
         /// <param name="replaceToken"></param>
         /// <param name="mTimeout"></param>
         /// <returns></returns>
-        public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+        public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
         {
             var responsePackNew = RequestHttpsBase(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
             //*****************Token杩囨湡澶勭悊*****************
@@ -383,7 +383,7 @@
         /// <param name="replaceToken"></param>
         /// <param name="mTimeout"></param>
         /// <returns></returns>
-        public static ResponsePackNew RequestHttpsUpload(Method method, string apiPath, object bodyParameterObject = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
+        public static ResponsePackNew RequestHttpsUpload(Method method, string apiPath, object bodyParameterObject = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
         {
             #region HttpWebRequest
             try
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index e43aa25..180b762 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -276,14 +276,28 @@
         #endregion
 
         #region 鈻� PushSerivce -- 鎺ㄩ�佹湇鍔℃帴鍙__________________________
+
         /// <summary>
-        /// 娣诲姞鎺ㄩ�乀oken
+        /// 娉ㄥ唽鎺ㄩ�佹帴鍙�
+        /// 鎵归噺鎺ㄩ�佺粦瀹氬灞呯ぞ鍖烘帴鍙�
+        /// 2021-09-09 瀵规帴鏂版帴鍙f敮鎸佺墿涓氬叕鍛婃帹閫�
+        /// communityCodes 涓嶄紶 榛樿鎵�鏈変綇瀹呮垨鑰呭皬鍖洪兘鏀跺埌鎺ㄩ��
         /// </summary>
-        public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/add";
+        public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/addPushToken";
         /// <summary>
-        /// 鍒犻櫎鎺ㄩ�乀oken
+        /// 娉ㄩ攢鎺ㄩ�佹帴鍙�
+        /// 鎵归噺瑙g粦瀹跺眳绀惧尯
+        /// 2021-09-09 瀵规帴鏂版帴鍙f敮鎸佺墿涓氬叕鍛婃帹閫�
         /// </summary>
-        public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/delete";
+        public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/unBindPushToken";
+        ///// <summary>
+        ///// 娣诲姞鎺ㄩ�乀oken
+        ///// </summary>
+        //public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/add";
+        ///// <summary>
+        ///// 鍒犻櫎鎺ㄩ�乀oken
+        ///// </summary>
+        //public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/delete";
         ///// <summary>
         /////// 鑾峰彇鎺ㄩ�佹秷鎭褰�
         /////// </summary>
@@ -308,6 +322,11 @@
         /// 閫氳繃涓婚敭id鍒犻櫎涓�鏉℃帹閫佽褰�
         /// </summary>
         public const string API_POST_PushSerivce_Deletepushinfo = "/smart-footstone/app/message/delete_by_id";
+        /// <summary>
+        /// 鑾峰彇鐗╀笟鍏憡璇︽儏
+        /// </summary>
+        public const string API_POST_PushSerivce_GetNoticeInfo = "/community-footstone/app/notice/info";
+
         #endregion
 
         #region 鈻�  -- 妫�娴嬫洿鏂版帴鍙__________________________
diff --git a/HDL_ON/DAL/Server/NewApiRes.cs b/HDL_ON/DAL/Server/NewApiRes.cs
index a5a3fc7..055a093 100644
--- a/HDL_ON/DAL/Server/NewApiRes.cs
+++ b/HDL_ON/DAL/Server/NewApiRes.cs
@@ -1067,6 +1067,15 @@
         /// 杞欢鏉ユ簮锛孍voyo銆丱N銆丱N_Plus
         /// </summary>
         public string software = SoftwareType.ON_Plus.ToString();
+        /// <summary>
+        /// 灏忓尯codes锛堜笉浼狅紝榛樿缁戝畾鎵�鏈変綇瀹呭拰灏忓尯鐨勬帹閫侊級
+        /// </summary>
+        public List<string> communityCodes;
+        /// <summary>
+        /// 鎸囧畾鎺ㄩ�佽瑷� 锛堢洰鍓嶈鍙傛暟杩樻病鐢級
+        /// 2021-09-13 澧炲姞褰撳墠APP浣跨敤鐨勮瑷�鍙傛暟锛� 鐩墠浜戠鎺ュ彛杩樻病鏀寔
+        /// </summary>
+        public string languageType;
     }
 
     /// <summary>
@@ -1116,6 +1125,10 @@
         /// 娑堟伅璁板綍Id
         /// </summary>
         public string msgId;
+        /// <summary>
+        /// 鍒犻櫎鐗╀笟鍏憡瑕佽繖涓�
+        /// </summary>
+        public string pushType;
     }
 
 
diff --git a/HDL_ON/Entity/Device/DeviceModule.cs b/HDL_ON/Entity/Device/DeviceModule.cs
index ed330ea..bbb8cd6 100644
--- a/HDL_ON/Entity/Device/DeviceModule.cs
+++ b/HDL_ON/Entity/Device/DeviceModule.cs
@@ -40,5 +40,14 @@
         /// 鍖哄垎鏄痓us璁惧锛岃繕鏄痥nx璁惧
         /// </summary>
         public string driver_code = "";
+        /// <summary>
+        /// 鏄惁涓荤綉鍏�
+        /// </summary>
+        public bool master;
+        /// <summary>
+        /// 鏄惁寮�鍚簡鏈湴鍔犲瘑
+        /// 2021-09-23 娉ㄦ剰锛氫负浜嗗吋瀹规帶鍒朵互鍓嶄笉鍔犲瘑缃戝叧瑕佺敤杩欎釜鏂扮殑瀛楁锛屼笉鑳界敤local_encrypt锛屽洜涓哄彂鐜颁互鍓嶉儴鍒嗗浐浠跺凡缁忔湁杩欎釜鏍囪骞朵笖鍥炲true锛屼絾瀹為檯涓婇�氫俊杩樻病鍔犲瘑鐨�
+        /// </summary>
+        public bool isLocalEncrypt;
     }
 }
diff --git a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
index 7028c70..5708458 100644
--- a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
+++ b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
@@ -122,6 +122,10 @@
         /// 璋冭瘯鏉冮檺鏄惁鎵撳紑
         /// </summary>
         public bool debugPerm;
+        /// <summary>
+        /// 缃戝叧鏈湴閫氫俊鍔犲瘑Key锛屽悓涓�涓綇瀹� 瀵嗛挜鍒涘缓鍚庡氨涓嶅彉
+        /// </summary>
+        public string localSecret;
     }
 
 }
diff --git a/HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs b/HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs
index c53bfd5..cae77b9 100644
--- a/HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs
+++ b/HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs
@@ -14,6 +14,10 @@
         /// bodyView
         /// </summary>
         FrameLayout bodyView;
+        /// <summary>
+        /// mWebView
+        /// </summary>
+        public WebView mWebView;
 
         /// <summary>
         /// WebViewDialog
@@ -26,28 +30,37 @@
         /// <summary>
         /// 鍔犺浇椤甸潰
         /// </summary>
-        /// <param name="titleStr"></param>
-        /// <param name="url"></param>
-        public void LoadPage(string titleStr, string url)
+        void AddBodyViewWithTittle(string titleStr)
         {
             bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
             this.AddChidren(bodyView);
             new TopViewDiv(this, bodyView, titleStr).LoadTopView();
-
             //WebView
-            var webView = new WebView() {
+            mWebView = new WebView()
+            {
                 Y = Application.GetRealHeight(64),
                 Height = bodyView.Height - Application.GetRealHeight(64),
                 X = Application.GetRealWidth(16),
                 Width = bodyView.Width - Application.GetRealWidth(32)
             };
-            bodyView.AddChidren(webView);
+            bodyView.AddChidren(mWebView);
+        }
+
+        /// <summary>
+        /// 鍔犺浇椤甸潰
+        /// </summary>
+        /// <param name="titleStr"></param>
+        /// <param name="url"></param>
+        public void LoadPage(string titleStr, string url) {
+
+            AddBodyViewWithTittle(titleStr);
+
             try
             {
                 if (!string.IsNullOrEmpty(url))
                 {
                     //鍔犺浇缃戝潃
-                    webView.LoadRequest(url);
+                    mWebView.LoadRequest(url);
                 }
             }
             catch
@@ -57,5 +70,34 @@
 
             this.Show();
         }
+
+
+        /// <summary>
+        /// 鍔犺浇椤甸潰
+        /// html瀵屾枃鏈�
+        /// </summary>
+        /// <param name="titleStr"></param>
+        /// <param name="htmlStr"></param>
+        public void LoadPageWithHtmlStr(string titleStr, string htmlStr)
+        {
+
+            AddBodyViewWithTittle(titleStr);
+
+            try
+            {
+                if (!string.IsNullOrEmpty(htmlStr))
+                {
+                    //html瀵屾枃鏈�
+                    mWebView.LoadHTMLString(htmlStr);
+                }
+            }
+            catch
+            {
+
+            }
+
+            this.Show();
+        }
+
     }
 }
diff --git a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
index eb5f464..b2635af 100644
--- a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -140,7 +140,7 @@
 #endif
 
             };
-#endregion
+            #endregion
 
             #region 鍒嗕韩涓庡姛鑳�
             shareMenuButton = new MenuButton()
@@ -160,7 +160,7 @@
             shareMenuButton.SelectAction = shateAction;
             #endregion
 
-#region 鎶ヨ绫�
+            #region 鎶ヨ绫�
             alarmMenuButton = new MenuButton()
             {
                 X = shareMenuButton.Right,
@@ -175,9 +175,9 @@
                 MenuButtonSelect(2);
             };
             alarmMenuButton.SelectAction = alarmAction;
-#endregion
+            #endregion
 
-#region 绯荤粺淇℃伅
+            #region 绯荤粺淇℃伅
             systemMenuButton = new MenuButton()
             {
                 X = alarmMenuButton.Right,
@@ -194,16 +194,17 @@
             systemMenuButton.SelectAction = systemAction;
             #endregion
 
-            #region 鐗╀笟閫氱煡
+            #region 鐗╀笟閫氱煡 2021-09-15澧炲姞
             propertyMenuButton = new MenuButton()
             {
                 X = systemMenuButton.Right,
                 Y = Application.GetRealWidth(16),
             };
-            //menuView.AddChidren(propertyMenuButton); //鍏堝睆钄�
-            propertyMenuButton.ImageButton.SelectedImagePath = "Collection/MesCenter/SystemOn.png";
-            propertyMenuButton.ImageButton.UnSelectedImagePath = "Collection/MesCenter/System.png";
-            propertyMenuButton.TextButton.TextID = StringId.SystemMessage;
+            menuView.AddChidren(propertyMenuButton); 
+            propertyMenuButton.ImageButton.SelectedImagePath = "Collection/MesCenter/PropertyOn.png";
+            propertyMenuButton.ImageButton.UnSelectedImagePath = "Collection/MesCenter/Property.png";
+            propertyMenuButton.TextButton.TextID = StringId.Propertynotice;
+            propertyMenuButton.TextButton.IsMoreLines = true;
             Action propertyAction = () =>
             {
                 MenuButtonSelect(4);
@@ -211,12 +212,12 @@
             propertyMenuButton.SelectAction = propertyAction;
             #endregion
 
-            //鍏堝睆钄�
-            ////鍙硃addingView 
-            //menuView.AddChidren(new Button() {
-            //    Width = Application.GetRealWidth(15),
-            //    BackgroundColor = CSS_Color.viewTranslucence
-            //});
+            //鍙硃addingView 
+            menuView.AddChidren(new Button()
+            {
+                Width = Application.GetRealWidth(15),
+                BackgroundColor = CSS_Color.viewTranslucence
+            });
 
         }
 
@@ -295,6 +296,8 @@
                 propertyMenuButton.IsSelected = true;
 
             }
+
+            menuView.ScrollToX(selectId * Application.GetRealWidth(40));
 
             GetPushMessageList(showMesType);
         }
@@ -404,16 +407,17 @@
 
 
             btnDatetime.Text = GetUnixToDateTime(pushMessageInfo.createTime);
-            //2020-12-23 鍘绘帀鐐瑰嚮寮圭獥浜嬩欢
-            //EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
-            //{
-            //    new Alert(pushMessageInfo.messageTitle, pushMessageInfo.messageContent, Language.StringByID(StringId.Close)).Show();
-            //};
-            //rowView.MouseUpEventHandler = eventHandler;
-            //btnTilte.MouseUpEventHandler = eventHandler;
-            //btnSubtitle.MouseUpEventHandler = eventHandler;
 
-           
+            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+            {
+                OnClickPushMessageInfo(pushMessageInfo);
+                //new Alert(pushMessageInfo.messageTitle, pushMessageInfo.messageContent, Language.StringByID(StringId.Close)).Show();
+            };
+            rowView.MouseUpEventHandler = eventHandler;
+            btnTilte.MouseUpEventHandler = eventHandler;
+            btnSubtitle.MouseUpEventHandler = eventHandler;
+
+
         }
 
         /// <summary>
@@ -447,7 +451,13 @@
             {
                 try
                 {
-                    var result = new HttpServerRequest().PushSerivceDeleteMessage(pushMessageInfo.id);
+                    var delPush = new PushMsgIdObj()
+                    {
+                        msgId = pushMessageInfo.id,
+                        pushType = pushMessageInfo.pushType
+                    };
+
+                    var result = new HttpServerRequest().PushSerivceDeleteMessage(delPush);
                     if (result)
                     {
                         PushMessageInfoList.Remove(pushMessageInfo);
@@ -512,7 +522,7 @@
         void GetPushMessageList(int queryType = 0)
         {
             bodyScrolView.RemoveAll();
-            if(PushMessageInfoList == null)
+            if (PushMessageInfoList == null)
             {
                 PushMessageInfoList = new List<PushMessageInfo>();
             }
@@ -520,7 +530,7 @@
             {
                 PushMessageInfoList.Clear();
             }
-          
+
             YearMark = "";//鏍囪娓呯┖
             if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId))
             {
@@ -542,7 +552,8 @@
                         //PushMessageInfoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PushMessageInfo>>(result.Data.ToString());
                         //2021-08-28 鏀逛负鍒嗛〉鎺ュ彛
                         var mPushMesList = Newtonsoft.Json.JsonConvert.DeserializeObject<PushMessageInfoList>(result.Data.ToString());
-                        if(mPushMesList != null) {
+                        if (mPushMesList != null)
+                        {
                             PushMessageInfoList = mPushMesList.list;
                         }
 
@@ -613,7 +624,107 @@
             }
         }
 
-#region 娴嬭瘯
+        /// <summary>
+        /// 鑾峰彇鐗╀笟閫氱煡璇︽儏
+        /// </summary>
+        /// <param name="noticeId"></param>
+        void GetPropertyNoticeDetails(string noticeId)
+        {
+            var waitPage = new Loading();
+            bodyView.AddChidren(waitPage);
+            waitPage.Start(Language.StringByID(StringId.PleaseWait));
+
+            new Thread(() =>
+            {
+                try
+                {
+                    var result = new HttpServerRequest().GetPropertyNoticeDetails(noticeId);
+                    if (result.Code == StateCode.SUCCESS)
+                    {
+                        var mPushNoticeInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<PushNoticeInfo>(result.Data.ToString());
+                        if (mPushNoticeInfo != null)
+                        {
+                            Application.RunOnMainThread(() =>
+                            {
+                                new WebViewDialog().LoadPageWithHtmlStr(mPushNoticeInfo.title, mPushNoticeInfo.content);
+                            });
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                }
+                finally
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        if (waitPage != null)
+                        {
+                            waitPage.RemoveFromParent();
+                            waitPage = null;
+                        }
+                    });
+                }
+            })
+            { IsBackground = true }.Start();
+        }
+
+        /// <summary>
+        /// 閫氱煡淇℃伅鐐瑰嚮浜嬩欢
+        /// </summary>
+        /// <param name="pushMessageInfo"></param>
+        void OnClickPushMessageInfo(PushMessageInfo pushMessageInfo)
+        {
+
+            if (pushMessageInfo.pushType == PushType.Notice.ToString())
+            {
+                //Utlis.WriteLine("鐗╀笟閫氱煡");
+                string noticeId = GetNoticeId(pushMessageInfo.messageExpand);
+                if (!string.IsNullOrEmpty(noticeId))
+                {
+                    GetPropertyNoticeDetails(noticeId);
+                }
+                else
+                {
+                    Utlis.WriteLine("noticeId null");
+                }
+            }
+            else
+            {
+                Utlis.WriteLine("鍏跺畠閫氱煡绫诲瀷");
+            }
+        }
+
+        /// <summary>
+        /// 瑙f瀽messageExpand 鎻愬彇targetId
+        /// </summary>
+        /// <param name="messageExpand"></param>
+        /// <returns></returns>
+        string GetNoticeId(string messageExpand)
+        {
+            try
+            {
+                if (!string.IsNullOrEmpty(messageExpand))
+                {
+                    var mMessageExpandInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageExpandInfo>(messageExpand);
+                    if (mMessageExpandInfo != null)
+                    {
+                        var mExpantContentInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ExpantContentInfo>(mMessageExpandInfo.expantContent);
+                        if(mExpantContentInfo != null)
+                        {
+                            return mExpantContentInfo.targetId;
+                        }
+                    }
+                }
+                return null;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
+        #region 娴嬭瘯
 #if DEBUG
         /// <summary>
         /// 
@@ -688,7 +799,7 @@
 
 #endif
 
-#endregion
+        #endregion
 
         /// <summary>
         /// 鏍囪鎵�鏈夋帹閫佹秷鎭凡璇�
@@ -778,10 +889,10 @@
         /// 娑堟伅鍐呭
         /// </summary>
         public string messageContent;
-        ///// <summary>
-        ///// 鎵╁睍鏁版嵁
-        ///// </summary>
-        //public string messageExpand;
+        /// <summary>
+        /// 鎵╁睍鏁版嵁
+        /// </summary>
+        public string messageExpand;
         ///// <summary>
         ///// 娑堟伅绫诲瀷锛�0锛氭彁绀猴紱1锛氭姤璀︼紱2锛氫赴鏋楀彲鏄璁插懠鍙紱3锛氬己鍒朵笅绾挎帹閫�
         ///// </summary>
@@ -806,4 +917,56 @@
 
     }
 
+
+    /// <summary>
+    /// 鐗╀笟鍏憡璇︽儏
+    /// </summary>
+    [System.Serializable]
+    public class PushNoticeInfo
+    {
+        /// <summary>
+        /// 娑堟伅ID
+        /// </summary>
+        public string noticeId;
+        /// <summary>
+        /// 娑堟伅鏍囬
+        /// </summary>
+        public string title;
+        /// <summary>
+        /// 瀵屾枃鏈唴瀹�
+        /// </summary>
+        public string content;
+    }
+
+    /// <summary>
+    /// 鎺ㄩ�佹墿灞曚俊鎭�
+    /// </summary>
+    [System.Serializable]
+    public class MessageExpandInfo
+    {
+        /// <summary>
+        /// expantContent
+        /// </summary>
+        public string expantContent;
+      
+    }
+
+    /// <summary>
+    /// 鎺ㄩ�佹墿灞曚俊鎭�
+    /// </summary>
+    [System.Serializable]
+    public class ExpantContentInfo
+    {
+        /// <summary>
+        /// targetId
+        /// </summary>
+        public string targetId;
+        /// <summary>
+        /// messageType
+        /// </summary>
+        public string messageType;
+
+    }
+
+
 }

--
Gitblit v1.8.0