feat(connectedWifi): 配网成功展示完成并隐藏刷新,未配网展示跳过

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-09-01 11:57:28 +08:00
co-authored by Claude Opus 4.7
parent 13d23376c2
commit c0bc61621b
3 changed files with 17 additions and 7 deletions
@@ -355,10 +355,6 @@
border-radius: 44rpx; border-radius: 44rpx;
background-color: #1385FA; background-color: #1385FA;
} }
.wifiBtn-disabled {
background-color: #A8C9F0;
}
} }
/* 空态 */ /* 空态 */
@@ -171,8 +171,11 @@ Page({
}, },
onConfirm() { onConfirm() {
if (!this.data.hasConnected) return
if (!this._ensureConnected()) return if (!this._ensureConnected()) return
wx.reLaunch({ url: '/pages/equipment/equipment' }) wx.reLaunch({ url: '/pages/equipment/equipment' })
}, },
onSkip() {
wx.reLaunch({ url: '/pages/home/home' })
}
}) })
@@ -84,6 +84,9 @@
<view class="wifiHeader"> <view class="wifiHeader">
<view> <view>
<view>附近WiFi</view> <view>附近WiFi</view>
<block wx:if="{{!hasConnected}}">
<view bind:tap="onRefresh">刷新</view>
</block>
</view> </view>
<view>网络列表(请选择一个网络进行连接)</view> <view>网络列表(请选择一个网络进行连接)</view>
</view> </view>
@@ -113,7 +116,12 @@
</block> </block>
</scroll-view> </scroll-view>
<view class="wifiBtn"> <view class="wifiBtn">
<view class="{{hasConnected ? '' : 'wifiBtn-disabled'}}" bind:tap="onConfirm">确认</view> <block wx:if="{{hasConnected}}">
<view bind:tap="onConfirm">完成</view>
</block>
<block wx:else>
<view bind:tap="onSkip">跳过</view>
</block>
</view> </view>
</block> </block>
@@ -131,6 +139,9 @@
</view> </view>
<text>未查找到可用wifi,请重试</text> <text>未查找到可用wifi,请重试</text>
</view> </view>
<view class="wifiBtn">
<view bind:tap="onSkip">跳过</view>
</view>
</block> </block>
</block> </block>
</view> </view>