|
@@ -240,7 +240,9 @@
|
|
|
});
|
|
|
}, 10000);
|
|
|
}else{
|
|
|
- this.startSearchWifi();
|
|
|
+ wx.showLoading({title:'正在获取WiFi...'})
|
|
|
+ this.wifiList = [];
|
|
|
+ this.getWifiList();
|
|
|
}
|
|
|
},
|
|
|
connectWifi(){
|
|
@@ -300,13 +302,13 @@
|
|
|
let that = this;
|
|
|
// 步骤 2: 监听获取到 WiFi 列表数据的事件
|
|
|
uni.onGetWifiList((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
let list = that.processWifiList(res.wifiList);
|
|
|
that.wifiList = list.map(l=>l.SSID)?.filter(l=>l.indexOf('5G')<0);
|
|
|
that.wifiListCache = [...that.wifiList];
|
|
|
that.wifiSSID = that.wifiList[0];
|
|
|
that.wifiPWD = uni.getStorageSync(that.wifiSSID)||'';
|
|
|
that.isInitOK = true
|
|
|
- uni.hideLoading();
|
|
|
});
|
|
|
uni.getWifiList({
|
|
|
success: () => {
|