Commit Graph
170 Commits
Author SHA1 Message Date
17792275749andClaude Sonnet 4.6 439f560218 fix(lefu): 完善蓝牙连接状态处理,修复断开后 UI 不同步问题
- connectState 回调增加 UNAVAILABLE 清理和 READY 自动重连
- disconnect() 增加 _intentionalConnect 标记避免误重连
- deviceWillDisconnect 增加 _activeProtocol 防重入判断
- connectedDevice/equipment/connectedWifi 增加断开状态响应
- connectedWifi 设备断开后自动退出配网页

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:43:49 +08:00
17792275749andClaude Opus 4.7 15e089f5e3 fix(equipment): 进入页面不再信任缓存的蓝牙连接状态,每次走真实扫描
- _checkAndAutoConnect 去掉 isConnected+deviceInfo 缓存短路,始终走 autoConnect
- autoConnect 去掉 isConnected 短路,每次真实扫描
- connect() 先断开旧连接再建新连接,避免新旧连接冲突
- connectState CONNECTFAILED 时重置 _intentionalConnect,防止标记卡死
- deviceConnect handler 移除冗余的 _connectState 赋值

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-20 16:08:53 +08:00
17792275749andClaude Opus 4.7 5705f9e622 fix(connectedDevice): 注释掉帮助文案区块
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 13:47:35 +08:00
17792275749andClaude Opus 4.7 f8fc84b8e7 fix(addMember, editMember): 身份证查询 flag=101/null 分支补充回填 sex 和 birthday
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 11:58:38 +08:00
17792275749andClaude Opus 4.7 587dfc1f3a fix(addMember, editMember): 身份证查询无结果时补充设置 sex 和 birthday
fetchUserInfoByIdCard 查无此人时 parseIdCard 返回了 gender/age/sex/birthday
四个字段,原来只设了 gender 和 age,漏了 sex 和 birthday。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 18:14:08 +08:00
17792275749andClaude Opus 4.7 9b669aa486 fix(addMember): 员工编号查询结果保存完整数据,提交时作为 base 合并
员工 tab 提交时使用 employeeQueryResult(getUserInfoByWkno 返回的完整数据)
作为 payload base,确保 userId、deviceId 等字段不丢失。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 18:09:44 +08:00
17792275749andClaude Opus 4.7 24fda6becc fix(equipmentMember): 移除删除主用户时的子用户检查限制
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 17:33:28 +08:00
17792275749andClaude Opus 4.7 f10ce6656f fix(addMember, editMember): 身份证号输入时同步更新性别、年龄、sex、出生年月
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 17:19:58 +08:00
17792275749andClaude Opus 4.7 e8d40d7dfc fix: API升级v5、错误提示优化、体重必填移除等
- selectMemberDrawer: v3→v5 API升级
- lefu/service: 统一错误提示文案
- equipmentMember: 修复删除确认弹框文案
- home: 优化加载中提示
- supplementPersonal: 移除体重必填校验

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 15:57:43 +08:00
17792275749andClaude Opus 4.7 ea8f828702 fix(addMember, editMember): 身份证号输入时立即解析性别年龄,不再清空已有值
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 11:08:56 +08:00
17792275749andClaude Opus 4.7 9b011b82a7 feat(editMember): 家庭用户编辑时接入身份证查询与确认弹框
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 08:33:39 +08:00
17792275749andClaude Opus 4.7 c3b031aed4 feat(addMember, editMember): 接入员工编号查询,部门展示改用secondDepart/thirdDepart
- onQueryEmployee 接入 GET /weighingScale/v5/getUserInfoByWkno
- 单位展示由 workNo 改为 secondDepart / thirdDepart 拼接
- birthday 员工查询时回填,提交统一取值
- edit/user 接口 v3 升级到 v5

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 17:57:35 +08:00
17792275749andClaude Opus 4.7 cb626c7c88 fix(addMember): 员工tab未查询到信息时隐藏底部按钮
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 14:01:55 +08:00
17792275749andClaude Opus 4.7 e5871af764 refactor(addMember): 移除编辑逻辑,addMember改为纯新增页
- 删除SysUserDevice/isEdit/userId/onLoad等编辑回填逻辑
- onSubmit统一走添加流程
- ghost-btn去掉isEdit条件

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 13:38:28 +08:00
17792275749andClaude Opus 4.7 4e4afd6958 feat(addMember): 员工/家庭双tab完整改造,状态机控制查询展示
- 员工tab:编号输入+查询→三种状态(未查询/查不到/查到展示)
- 家庭tab:familyInfo_卡片包裹,昵称/身份证/性别切换/出生年月/身高体重同行
- 切换tab或改编号即时清空查询结果
- 提交区分员工/家庭双模式校验,dataType写入payload

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 13:32:55 +08:00
17792275749andClaude Opus 4.7 57950bd7c2 feat(addMember): 添加用户页改造,员工/家庭双tab + 员工编号查询表单
- 顶部胶囊式 tabs(员工/家庭用户)切换
- 员工 tab:员工编号输入 + 确认查询 → 回填用户信息 → 补充身高体重
- 家庭 tab:待实现
- 表单宽度调整为 100% 自适应

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 11:48:11 +08:00
17792275749andClaude Opus 4.7 fd93f37d72 refactor(editMember): 编辑用户页独立,区分家庭/非家庭双模式表单
- 家庭用户:昵称(必填)、身份证(选填)、性别(切换按钮)、出生年月(date picker)、身高(必填)、体重(选填)
- 非家庭用户:姓名、单位、性别、年龄只读展示,身高(必填)、体重(选填)
- 提交时完整展开接口原始数据覆盖修改字段
- 去掉新增页专属的抽屉选择、确认弹框、身份证校验

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-11 10:16:13 +08:00
17792275749andClaude Sonnet 4.6 05a5a438e3 feat(editMember): 新增独立编辑用户页面,编辑入口指向editMember
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 08:47:47 +08:00
17792275749andClaude Opus 4.7 44659a6ae4 feat(selectMemberDrawer): 用户列表新增本人/员工/家庭用户标签展示
- ExistingMember 补充 dataType/relationType 字段
- API 映射层透传 dataType 与 relationType
- member-type 区域按类型展示对应颜色标签

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 17:16:22 +08:00
17792275749andClaude Opus 4.7 0fab5259c9 chore: 切回测试环境,弹窗样式微调,文案精简
- 域名切回测试环境,超时提示统一
- 删除弹窗样式调整(宽度/圆角/按钮颜色)
- 删除确认文案精简,同步 loading 文案统一为"加载中"
- 移除 connectedWifi 调试背景色

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 16:59:25 +08:00
17792275749andClaude Opus 4.7 099b7613fe feat(equipmentMember): 用户列表拆分本人/员工/家庭成员三个分区
- 按 dataType 拆分:0=员工 1=家庭成员,relationType=1 归入本人
- 本人区块保留设备容量头部,仅支持编辑
- 员工/家庭成员区块独立显示,空列表自动隐藏
- badge 规则:本人/他人添加显示,自己添加不显示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 16:36:36 +08:00
17792275749andClaude Opus 4.7 485725a486 refactor: 统一术语「成员」→「用户」,代码格式化
- 页面文案、注释、Toast 提示统一改为"用户"
- lefu 模块缩进格式化(空格→Tab)
- selectMemberDrawer 组件注释统一

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 15:18:58 +08:00
17792275749andClaude Opus 4.7 97c135786c feat(equipmentMember): 删除确认改为自定义弹窗,他人添加用户红色加粗警示
- 删除确认弹窗替代原生 wx.showModal,仿原生风格
- 他人添加成员删除时显示红色加粗警示文案
- 成员列表操作区统一展示编辑/删除按钮
- 名字旁补充「本人」「他人添加」标签

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 15:05:51 +08:00
17792275749andClaude Sonnet 4.6 d44e0a9e76 style(device): 设备列表容器添加 overflow hidden
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 19:56:19 +08:00
17792275749andClaude Opus 4.7 3187cc48df fix: 切换生产环境域名;scroll-view 补充 scroll-y 属性
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 17:17:23 +08:00
17792275749andClaude Opus 4.7 77e768f6c7 feat(addMember): 选择已有成员补服务端校验;表单加scroll-view;上限10人限制
- onSelectMember 选中后调用 fetchUserInfoByIdCard 走服务端校验
- 表单区域包裹 scroll-view,适配小屏滚动
- equipmentMember 添加按钮超10人弹 toast 提示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 16:52:59 +08:00
17792275749andClaude Sonnet 4.6 dc5010350c fix(app): 恢复启动时自动跳过登录页逻辑
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 14:53:19 +08:00
17792275749andClaude Sonnet 4.6 9960a17cac fix(addMember): 查无此人时提示未查询到用户信息,接口开启 loading
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 14:37:13 +08:00
17792275749andClaude Sonnet 4.6 5f0f8ae9d0 fix(addMember): serverResult 为 null 时本地解析身份证补偿性别年龄
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 14:23:18 +08:00
17792275749andClaude Sonnet 4.6 2827869801 fix(addMember): flag 判断改为宽松相等
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 13:55:35 +08:00
17792275749andClaude Sonnet 4.6 241ce67e26 fix(addMember): 身份证查询结果改为 flag 字段判断
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 13:37:49 +08:00
17792275749andClaude Sonnet 4.6 30d62a9bd0 feat(member): 身份证查询已存在时弹框确认,表单锁定只读
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 18:49:12 +08:00
17792275749andClaude Sonnet 4.6 e2b44b4d63 fix(data): 排除参数还原为 userId(早上误改为 id)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:15:44 +08:00
17792275749andClaude Sonnet 4.6 a8714bb9e9 feat(device): 未连接态仅保留连接按钮,简化操作
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 14:08:59 +08:00
17792275749andClaude Sonnet 4.6 1548ebbb74 feat(member): 删除成员先同步设备再调接口;新增 clearDeviceMembers 方法
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 13:59:21 +08:00
17792275749andClaude Sonnet 4.6 d4ab21ca6f fix(device): 设备列表卡片间距优化,连接缓存简化 userInfo 存储
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 13:35:53 +08:00
17792275749andClaude Sonnet 4.6 d373da11c7 fix(data): 切换成员时补充 id 字段并修复 userId 类型问题
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 10:40:37 +08:00
17792275749andClaude Sonnet 4.6 32dd83a738 refactor(data): excludeUserId 重命名为 excludeId,语义更准确
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 10:17:25 +08:00
17792275749andClaude Sonnet 4.6 e898c4d305 fix(data): 切换成员排除参数改为用户 id 字段
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 09:53:36 +08:00
17792275749andClaude Sonnet 4.6 fd90950f8f refactor(service): 错误提示去除 [LeFu] 前缀,优化用户体验
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 09:46:39 +08:00
17792275749andClaude Sonnet 4.6 5ddf45951d chore(config): 项目配置格式化,补充 condition 字段
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 19:03:30 +08:00
17792275749andClaude Sonnet 4.6 cc8dfb4f6e feat(supplement): 添加设备流程表单自动回填缓存数据并禁用编辑;payload 携带 SN
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 17:28:04 +08:00
17792275749andClaude Sonnet 4.6 85402f2ec1 feat(device): 设备连接成功后缓存关联用户信息;添加成员时携带 SN
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 16:46:10 +08:00
17792275749andClaude Sonnet 4.6 87b789f5f3 fix(data): 历史数据切换成员列表排除当前查看的用户
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 16:04:51 +08:00
17792275749andClaude Sonnet 4.6 3efd29c84e fix(my): 我的页面添加 userInfo 空值保护,避免未登录时报错
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 15:56:50 +08:00
17792275749andClaude Sonnet 4.6 2ecb86871b [AI Generated]: refactor(member,my): 成员页重构为 flex+scroll-view 布局并设为首页;我的页改为 onShow 刷新
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 15:39:39 +08:00
17792275749andClaude Sonnet 4.6 14ec4fe177 [AI Generated]: feat(device): 设备列表添加 scroll-view 支持滚动,优化布局结构
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 14:36:01 +08:00
17792275749andClaude Opus 4.7 0a05fde0ba [AI Generated]: feat(member,home): addMember 接入身份证联动校验;OTA 升级 15s 后自动重连
- addMember: 姓名+身份证输入联动调 getUserInfoByIdcard,result 非 null 时以服务端身份证重算性别年龄
- addMember: 新增 hasQueried 标记,result 为 null 视为合法新人允许提交;payload 以 serverResult 做底再用表单覆盖
- home: OTA 升级 setTimeout 到点后清 connected 状态并触发 lefuService.autoConnect() 重新扫连

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 22:02:56 +08:00
17792275749andClaude Opus 4.7 b979771650 [AI Generated]: feat(device): 扫描命中缓存设备自动连接(不跳转),整卡点击按状态跳转/连接
- connectedDevice:扫描列表与 connectDeviceInfo 缓存按 deviceId 实时比对,命中后一次性自动连,仅刷状态/缓存不跳页
- connectedDevice:新增 onTapCard,整卡点击 → 已连接跳 connectedWifi,未连接走 onConnect;按钮改 catch:tap 防冒泡
- connectedWifi:移除 onConfirm 中下发主用户与 calcAge/StoredUserInfo 残留,统一跳 supplementPersonal

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 19:28:38 +08:00
17792275749andClaude Opus 4.7 b94ffb7995 [AI Generated]: feat(device): 设备卡片整张可点击,波纹按状态播放,配网/OTA 日志与状态判断完善
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 17:36:05 +08:00