fix: API升级v5、错误提示优化、体重必填移除等

- selectMemberDrawer: v3→v5 API升级
- lefu/service: 统一错误提示文案
- equipmentMember: 修复删除确认弹框文案
- home: 优化加载中提示
- supplementPersonal: 移除体重必填校验

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-06-12 15:57:43 +08:00
co-authored by Claude Opus 4.7
parent ea8f828702
commit e8d40d7dfc
6 changed files with 9 additions and 14 deletions
+6 -6
View File
@@ -352,7 +352,7 @@ class LeFuService {
if (!needUpdate) { resolve(false); return }
this._activeProtocol.codeOtaUpdate((status: number) => {
console.log(`codeOtaUpdatecodeOtaUpdatecodeOtaUpdate ${status}`)
status != 0 ? reject(new Error('OTA 升级失败')) : resolve(true)
status != 0 ? reject(new Error('请求失败')) : resolve(true)
})
})
.catch(reject)
@@ -399,14 +399,14 @@ class LeFuService {
}, 2000)
}
// ─── 清除设备用户(不下发) ─────────────────────
// ─── 请求用户(不下发) ─────────────────────
clearDeviceMembers(): Promise<void> {
return new Promise((resolve, reject) => {
if (!this._activeProtocol) { reject(new Error('设备未连接')); return }
const timer = setTimeout(() => reject(new Error('清除设备用户超时')), 15000)
const timer = setTimeout(() => reject(new Error('请求超时')), 15000)
this._activeProtocol.codeClearDeviceData('01', (res: number) => {
clearTimeout(timer)
res === 0 ? resolve() : reject(new Error('清除设备用户失败'))
res === 0 ? resolve() : reject(new Error('请求失败'))
})
})
}
@@ -418,10 +418,10 @@ class LeFuService {
const mainUser = members.find(m => m.isSelf)
if (!mainUser) { reject(new Error('缺少主用户')); return }
const clearTimer = setTimeout(() => reject(new Error('清除设备用户超时')), 15000)
const clearTimer = setTimeout(() => reject(new Error('请求超时')), 15000)
this._activeProtocol.codeClearDeviceData('01', (clearRes: number) => {
clearTimeout(clearTimer)
if (clearRes != 0) { reject(new Error('清除设备用户失败')); return }
if (clearRes != 0) { reject(new Error('请求失败')); return }
let index = 0
let syncTimer: number | null = null