From 3dcbd186c42c598c0c08d1cd37034cf2baa09e54 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 30 十二月 2019 15:47:51 +0800
Subject: [PATCH] 合并了代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs |   42 +++++++++++++++++++++++++++++-------------
 1 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
index 04af707..76b7605 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -93,6 +93,23 @@
                 });
                 return;
             }
+            else if (topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/Deleted"
+                || topic == "/ZigbeeGateWayToClient/" + Common.Config.Instance.Guid + "/Push/DeletedShareData")
+            {
+                if (UserCenterResourse.UserInfo.AuthorityNo == 3)
+                {
+                    HdlThreadLogic.Current.RunMain(() =>
+                    {
+                        //鍒嗕韩鏁版嵁宸茬粡鍙樻洿,璇烽噸鏂扮櫥闄�
+                        string msg = Language.StringByID(R.MyInternationalizationString.uShardDataIsChangedPleaseLoginAgain);
+                        var contr = new ShowMsgControl(ShowMsgType.Tip, msg);
+                        contr.Show();
+
+                        UserCenterLogic.ReLoginAgain(UserCenterResourse.UserInfo.Account, false);
+                    });
+                }
+                return;
+            }
             try
             {
                 if (HdlGatewayLogic.Current.IsGatewayExist(gatewayId) == false)
@@ -238,7 +255,7 @@
                 return;
             }
             var tempDevice = new CommonDevice() { DeviceAddr = receiveData.Value<string>("DeviceAddr"), DeviceEpoint = receiveData.Value<int>("Epoint") };
-            tempDevice.IsOnline = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(receiveData["Data"]["IsOnline"].ToString());
+            tempDevice.IsOnline = Convert.ToInt32(receiveData["Data"]["IsOnline"].ToString());
             
             this.DeviceReportPush(tempDevice, ReceiveComandDiv.A璁惧鍦ㄧ嚎涓婃姤);
         }
@@ -401,6 +418,8 @@
 
         #endregion
 
+
+
         #region 鈻� 娣诲姞璁惧浜嬩欢_______________________
 
         /// <summary>
@@ -501,19 +520,16 @@
                 //鏈夊彲鑳藉湪鍥炶皟鍑芥暟涓Щ闄や簡浜嬩欢锛屽鑷存姤閿欙紝鎵�浠ュ厛鏀堕泦锛屽啀璋冪敤
                 foreach (var action in list)
                 {
-                    Application.RunOnMainThread(() =>
+                    try
                     {
-                        try
-                        {
-                            action?.Invoke(common);
-                        }
-                        catch (Exception ex)
-                        {
-                            //Log鍑哄姏
-                            string msg = "鎺ㄩ�侀敊璇�! 褰撳墠婵�娲荤殑鐣岄潰[" + UserCenterResourse.NowActionFormID + "]";
-                            HdlLogLogic.Current.WriteLog(ex, msg);
-                        }
-                    });
+                        action?.Invoke(common);
+                    }
+                    catch (Exception ex)
+                    {
+                        //Log鍑哄姏
+                        string msg = "鎺ㄩ�侀敊璇�! 褰撳墠婵�娲荤殑鐣岄潰[" + UserCenterResourse.NowActionFormID + "]";
+                        HdlLogLogic.Current.WriteLog(ex, msg);
+                    }
                 }
             }
         }

--
Gitblit v1.8.0