JLChen
2021-01-11 5a5a2b696866f947b6025d26c3302e8ffef46435
Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
@@ -307,7 +307,7 @@
                            if (goNext) {
                                //先重置
                                goNext = false;
                                //网关版本符合要求,判断是否绑定网关成功,绑定成功了才能进行下一步
                                //网关版本符合要求,继续判断是否绑定网关成功,绑定成功了才能进行下一步跳转设备搜索页面
                                goNext = CheckIfBindGatewaySuccess (common);
                            }
                         
@@ -322,6 +322,7 @@
                                    inThisView = false;
                                    if (inView != null) {
                                        Utlis.WriteLine ("inView != null");
                                        //跳转设备搜索页面
                                        var deviceListView = new GuideSettingGateway (common);
                                        (inView.Parent as PageLayout).AddChidren (deviceListView);
                                        deviceListView.ShowPage ();
@@ -358,8 +359,11 @@
        {
            try {
                if (UserConfig.Instance.CheckHomeGatewaysNotEmpty ()) {
                    //之前绑定过网关,并且和当前搜索到到网关一致
                    if (UserConfig.Instance.HomeGateway.mac.ToUpper () == gatewayBase.MAC.Replace (".", "").ToUpper ()) {
                    //之前绑定过网关,并且和当前搜索到到网关一致,子网号设备号都要一致
                    if (UserConfig.Instance.HomeGateway.mac.ToUpper () == gatewayBase.MAC.Replace (".", "").ToUpper ()
                        && UserConfig.Instance.HomeGateway.subnetId == gatewayBase.SubnetID
                        && UserConfig.Instance.HomeGateway.deviceId == gatewayBase.DeviceID
                        ) {
                        return true;
                    }
                }
@@ -368,7 +372,7 @@
                //重新绑定
                var bindGatewayObj = new BindGatewayObj () {
                    homeId = UserConfig.Instance.CurrentRegion.Id,
                    subnetId = gatewayBase.sceneID,
                    subnetId = gatewayBase.SubnetID,
                    deviceId = gatewayBase.DeviceID,
                    gatewayType = GatewayType.BUSUDPGATEWAY.ToString (),
                    mac = gatewayMAC
@@ -386,7 +390,7 @@
                    IMessageCommon.Current.ShowErrorInfoAlter (revertObj.Code);
                }
            } catch {
                Utlis.WriteLine ("绑定网关失败");
            }
            return false;
        }