From a45fe56aeeac8f28a9891b83362954067c8166dc Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 14 八月 2020 09:07:05 +0800 Subject: [PATCH] 请合并新代码,更改多功能面板绑定表重复问题 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs old mode 100755 new mode 100644 index 37fe00a..7bd5ad8 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs @@ -164,6 +164,10 @@ /// 鍙樻洿缃戠粶鏃剁殑浜嬩欢 /// </summary> private string changedNetworkTime = string.Empty; + /// <summary> + /// 褰撳墠 wifi 鐨� + /// </summary> + private string oldSsid = string.Empty; #endregion @@ -373,8 +377,23 @@ /// 鐩戝惉瀹夊崜缃戠粶鍙樺寲 /// </summary> /// <param name="value">0:娌℃湁缃戠粶 1:4G 2:wifi</param> - private void NetworkStateChanged(int value) + public void NetworkStateChanged(int value) { + if (Common.Config.Instance.HomeId == string.Empty) + { + //鍦ㄧ櫥褰曠晫闈笉澶勭悊 + return; + } +#if iOS + var nowSsid = this.SSID; + if (this.oldSsid == nowSsid) + { + //濡傛灉褰撳墠 wifi 鐨勫悕瀛椾竴鏍凤紝鍒欎笉澶勭悊 + ZigBee.Common.Application.FindGateWaySocket.Start(); + return; + } + this.oldSsid = nowSsid; +#endif //娌℃湁缃戠粶 if (value == 0) { @@ -411,11 +430,14 @@ } //閲嶆柊鍒濆鍖朣ocket ZigBee.Common.Application.FindGateWaySocket.Stop(); + System.Threading.Thread.Sleep(100); + //鏂帀鏈湴杩炴帴 - HdlGatewayLogic.Current.ClearAllRealGateway(); + HdlGatewayLogic.Current.ClearAllRealGatewayConection(true); //鏂帀杩滅▼ ZigBee.Device.ZbGateway.DisConnectRemoteMqttClient(); + //濡傛灉鏄痺ifi if (value == 2) { ZigBee.Common.Application.FindGateWaySocket.Start(); -- Gitblit v1.8.0