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;
background-color: #1385FA;
}
.wifiBtn-disabled {
background-color: #A8C9F0;
}
}
/* 空态 */
@@ -171,8 +171,11 @@ Page({
},
onConfirm() {
if (!this.data.hasConnected) return
if (!this._ensureConnected()) return
wx.reLaunch({ url: '/pages/equipment/equipment' })
},
onSkip() {
wx.reLaunch({ url: '/pages/home/home' })
}
})
@@ -73,7 +73,7 @@
查找周边WiFi
</view>
</block>
<block wx:if="{{status === 'searching'}}">
<view class="wifiSearching">
搜索中...
@@ -84,6 +84,9 @@
<view class="wifiHeader">
<view>
<view>附近WiFi</view>
<block wx:if="{{!hasConnected}}">
<view bind:tap="onRefresh">刷新</view>
</block>
</view>
<view>网络列表(请选择一个网络进行连接)</view>
</view>
@@ -113,7 +116,12 @@
</block>
</scroll-view>
<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>
</block>
@@ -131,6 +139,9 @@
</view>
<text>未查找到可用wifi,请重试</text>
</view>
<view class="wifiBtn">
<view bind:tap="onSkip">跳过</view>
</view>
</block>
</block>
</view>