[AI Generated]: fix(*): 优化配网协议版本自动判断,改由configWifi内部根据modelNumber决定domain版本

This commit is contained in:
17792275749
2026-05-14 20:31:05 +08:00
parent 5c8370b943
commit b39bd7cb8d
4 changed files with 18 additions and 13 deletions
@@ -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({