[AI Generated]: fix(*): 优化配网协议版本自动判断,改由configWifi内部根据modelNumber决定domain版本
This commit is contained in:
@@ -253,10 +253,16 @@
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding-left: 12rpx;
|
||||
padding: 0 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
&::after {
|
||||
right: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 列表项:普通态 */
|
||||
.wifiItem {
|
||||
width: 100%;
|
||||
@@ -294,7 +300,7 @@
|
||||
|
||||
/* 右箭头 */
|
||||
>view:nth-of-type(2) {
|
||||
width: 10rpx;
|
||||
width: 20rpx;
|
||||
height: 18rpx;
|
||||
}
|
||||
}
|
||||
@@ -323,12 +329,11 @@
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
|
||||
>view {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #2AC79F;
|
||||
}
|
||||
/* 右箭头 */
|
||||
>view {
|
||||
width: 20rpx;
|
||||
height: 18rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { lefuService } from '../../lefu/index'
|
||||
import type { LeFuWifiItem, WifiVersion } from '../../lefu/index'
|
||||
import type { LeFuWifiItem } from '../../lefu/index'
|
||||
|
||||
interface WifiItem {
|
||||
ssid: string
|
||||
@@ -10,7 +10,6 @@ type WifiStatus = 'idle' | 'searching' | 'list' | 'empty' | 'password' | 'config
|
||||
type BleStatus = 'connected' | 'failed' | 'connecting'
|
||||
|
||||
Page({
|
||||
_wifiVersion: 'domain2' as WifiVersion,
|
||||
|
||||
data: {
|
||||
status: 'idle' as WifiStatus,
|
||||
@@ -107,7 +106,7 @@ Page({
|
||||
if (!selectedSsid) return
|
||||
this.setData({ status: 'configuring' })
|
||||
wx.showLoading({ title: '正在配网...', mask: true })
|
||||
lefuService.configWifi(selectedSsid, selectWifiPWD, this._wifiVersion)
|
||||
lefuService.configWifi(selectedSsid, selectWifiPWD)
|
||||
.then(() => {
|
||||
wx.hideLoading()
|
||||
this.setData({
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<text>{{item.ssid}}</text>
|
||||
<view>
|
||||
<text>已连接</text>
|
||||
<view></view>
|
||||
<view class="arrow"></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
Reference in New Issue
Block a user