From ecba45c93391066bc30c7bd602c3a7683fbb99a7 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 31 七月 2020 10:56:12 +0800
Subject: [PATCH] 临时备份

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs |   63 +++++++++++++++++++++----------
 1 files changed, 42 insertions(+), 21 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index 2f61f5d..b841920 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -22,9 +22,15 @@
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
         /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
-        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿閲嶅彂</param>
-        public static bool GetResultStatuByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = true)
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
+        public static bool GetResultStatuByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return false;
+            }
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
@@ -33,8 +39,7 @@
             {
                 if (setAgain == false)
                 {
-                    //褰撳墠鏃犳硶璁块棶缃戠粶
-                    ShowNotNetMsg(listNotShowError);
+                    //涓嶆寚瀹氶噸鍙�
                     return false;
                 }
                 byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
@@ -56,10 +61,17 @@
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
         /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
-        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿閲嶅彂</param>
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
         /// </param>
-        public static string GetResultCodeByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = true)
+        public static string GetResultCodeByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return "Error";
+            }
+
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
@@ -68,8 +80,7 @@
             {
                 if (setAgain == false)
                 {
-                    //褰撳墠鏃犳硶璁块棶缃戠粶
-                    ShowNotNetMsg(listNotShowError);
+                    //涓嶆寚瀹氶噸鍙�
                     return "Error";
                 }
                 byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
@@ -94,10 +105,16 @@
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
         /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
-        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿閲嶅彂</param>
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
         /// </param>
-        public static string GetResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = true)
+        public static string GetResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return null;
+            }
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
@@ -106,8 +123,7 @@
             {
                 if (setAgain == false)
                 {
-                    //褰撳墠鏃犳硶璁块棶缃戠粶
-                    ShowNotNetMsg(listNotShowError);
+                    //涓嶆寚瀹氶噸鍙�
                     return null;
                 }
                 byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
@@ -138,9 +154,15 @@
         /// <param name="checkAuthority">鏄惁妫�娴嬫潈闄愶紝璇ュ弬鏁颁笉鑳界渷鐣�</param>
         /// <param name="obj">涓�涓被</param>
         /// <param name="listNotShowError">涓嶉渶瑕佹樉绀洪敊璇殑閿欒绫诲埆(鎺ュ彛杩斿洖鐨勯敊璇被鍒�),濡傛灉鍖呭惈锛屽垯浼氳繑鍥炪�恡rue銆�</param>
-        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿閲嶅彂</param>
-        public static byte[] GetByteResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = true)
+        /// <param name="setAgain">褰撳彂閫佸け璐ユ椂,鏄惁閲嶅彂,榛樿涓嶉噸鍙�</param>
+        public static byte[] GetByteResponseDataByRequestHttps(string RequestName, bool checkAuthority, object obj, List<string> listNotShowError = null, bool setAgain = false)
         {
+            if (HdlWifiLogic.Current.CanAccessHttp == false && setAgain == false)
+            {
+                //褰撳墠鏃犳硶璁块棶缃戠粶(褰撻渶瑕侀噸鏂板彂閫佹椂,璺宠繃杩欎釜鍒ゆ柇)
+                ShowNotNetMsg(listNotShowError);
+                return null;
+            }
             //鑾峰彇鎺ュ彛鐨勮繛鎺ユā寮�
             var connectMode = GetHttpConnectMode(checkAuthority);
             //鑾峰彇浠庢帴鍙i偅閲屽彇鍒扮殑姣旂壒鏁版嵁
@@ -150,8 +172,7 @@
             {
                 if (setAgain == false)
                 {
-                    //褰撳墠鏃犳硶璁块棶缃戠粶
-                    ShowNotNetMsg(listNotShowError);
+                    //涓嶆寚瀹氶噸鍙�
                     return null;
                 }
                 revertObj = ResetByteRequestHttps(RequestName, checkAuthority, obj);
@@ -516,7 +537,7 @@
             //鏂紑杩滅▼Mqtt杩炴帴,閲嶆柊杩炴帴
             HdlThreadLogic.Current.RunThread(async () =>
             {
-                HdlGatewayLogic.Current.ClearAllRealGatewayConection(true);
+                HdlGatewayLogic.Current.ClearAllRealGateway();
                 await ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient();
             }, ShowErrorMode.NO);
         }
@@ -597,7 +618,7 @@
 
                 //娓呯┖褰撳墠浣忓畢id
                 Config.Instance.HomeId = string.Empty;
-                HdlGatewayLogic.Current.ClearAllRealGatewayConection(false);
+                HdlGatewayLogic.Current.ClearAllRealGateway();
 
                 //鏂紑杩滅▼Mqtt杩炴帴
                 HdlThreadLogic.Current.RunThread(async () =>
@@ -653,8 +674,8 @@
                 }
                 else if (view is UserView.UserPage)
                 {
-                    //鍒锋柊涓婚〉
-                    UserView.UserPage.Instance.ReFreshControl();
+                    var form = ((UserView.UserPage)view).GetNowActionForm();
+                    form?.FormActionAgainEvent();
                     return;
                 }
                 else
@@ -840,7 +861,7 @@
                 //鏂紑杩滅▼Mqtt杩炴帴,閲嶆柊杩炴帴
                 HdlThreadLogic.Current.RunThread(async () =>
                 {
-                    HdlGatewayLogic.Current.ClearAllRealGatewayConection(true);
+                    HdlGatewayLogic.Current.ClearAllRealGateway();
                     await ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient();
                 }, ShowErrorMode.NO);
 

--
Gitblit v1.8.0