[AI Generated]: fix(*): 移除废弃 WifiVersion 类型、修复 connectedWifi 事件绑定及升级 ppScale-plugin 至 0.0.25

This commit is contained in:
17792275749
2026-05-15 16:26:02 +08:00
parent 24d0ebec23
commit b6862c44d5
11 changed files with 25 additions and 25 deletions
@@ -14,7 +14,7 @@ Page({
data: {
status: 'idle' as WifiStatus,
deviceName: '智能体重秤',
bleStatus: 'connected' as BleStatus,
bleStatus: 'connecting' as BleStatus,
wifiList: [] as WifiItem[],
hasConnected: false,
selectedSsid: '',
@@ -16,7 +16,7 @@
<input
password="{{true}}"
value="{{selectWifiPWD}}"
bindinput="passwordInput"
bind:input="passwordInput"
placeholder="输入您的wi-fi密码"
placeholder-class="placeholderClass"/>
</block>
@@ -24,7 +24,7 @@
<input
password="{{false}}"
value="{{selectWifiPWD}}"
bindinput="passwordInput"
bind:input="passwordInput"
placeholder="输入您的wi-fi密码"
placeholder-class="placeholderClass"/>
</block>
+1 -2
View File
@@ -88,12 +88,11 @@ Page({
onLoad() {
const raw = wx.getStorageSync('userInfo') as StorageUserInfo | null
if (!raw?.userId) return
const storedUserId = raw.userId
const userInfo: PageUserInfo = {
...raw,
sex_dictText: raw.sex === 1 ? '男' : raw.sex === 2 ? '女' : '',
age: calcAge(raw.birthday),
isSelf: raw.userId === storedUserId,
isSelf: true,
}
this.setData({ userInfo })
this.loadData()
+3
View File
@@ -80,6 +80,9 @@ Page({
lefuService.onDisconnected(() => {
this.setData({ 'device.connected': false })
})
},
onShow() {
this.loadData()
},
+6 -6
View File
@@ -65,13 +65,13 @@ Page({
wx.setStorageSync('userInfo', result.user)
/* 上次连接设备不为空对象则直接进首页 */
const connectDeviceInfo = result.user?.connectDeviceInfo
if (connectDeviceInfo && connectDeviceInfo !== '{}') {
wx.setStorageSync('connectDeviceInfo', JSON.parse(connectDeviceInfo))
wx.reLaunch({ url: '/pages/home/home' })
} else {
// const connectDeviceInfo = result.user?.connectDeviceInfo
// if (connectDeviceInfo && connectDeviceInfo !== '{}') {
// wx.setStorageSync('connectDeviceInfo', JSON.parse(connectDeviceInfo))
// wx.reLaunch({ url: '/pages/home/home' })
// } else {
wx.reLaunch({ url: '/pages/connectedDevice/connectedDevice' })
}
// }
})
.catch(() => {
this.setData({ loading: false })