213 Commits
Author SHA1 Message Date
17792275749andClaude Code 51906af6dd fix(userManagement): 添加本人补传 id 字段
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-15 15:43:19 +08:00
17792275749andClaude Code deea304799 fix(userManagement): 添加本人参数 parentUserId 改为 userId
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-15 15:26:07 +08:00
17792275749andClaude Code 7e2033e235 feat(connectedDevice): 设备卡片底部显示 deviceId
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-15 15:17:23 +08:00
17792275749andClaude Code 9d56e63ce0 fix(userManagement): 补传添加成员 relationType 并修复删除后同步空列表报错
- 一键添加本人传 relationType=1,其他添加新增传 relationType=2
- _clearAndSync 待下发列表为空时跳过 syncMembersToDevice,避免空列表 reject

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-15 15:08:47 +08:00
17792275749andClaude Opus 4.7 9332990a77 feat(equipment): 设备页新增 OTA 升级与初始化功能
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-14 10:38:52 +08:00
17792275749andClaude Sonnet 4.6 109c9e1b70 style(equipment): 添加设备按钮改灰色胶囊,用户按钮蓝底高亮
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-11 15:38:14 +08:00
17792275749andClaude Sonnet 4.6 dc0a294406 feat(userManagement): 新增添加用户弹框组件
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-11 15:09:35 +08:00
17792275749andClaude Sonnet 4.6 9e8e26cb19 style(equipment): 设备操作按钮图标与文字尺寸微调
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-11 14:11:42 +08:00
17792275749andClaude Sonnet 4.6 6731ec2403 feat(supplementPersonal): 提交按钮文案改为"开始使用"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-11 14:09:35 +08:00
17792275749andClaude Sonnet 4.6 fa0246d1e5 feat(equipment): 已配对设备行按钮重构,添加设备入口仅运维可见
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-11 14:09:35 +08:00
17792275749andClaude Sonnet 4.6 b3e2a11423 chore(config): trial 环境域名切换到正式网关
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-11 14:09:32 +08:00
17792275749andClaude Opus 4.7 69d8fa75a5 feat(userManagement): 长按标题弹窗确认后重置设备用户并上报
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-04 17:36:48 +08:00
17792275749andClaude Opus 4.7 507915f2c4 fix(lefu): 搜索时 UNAVAILABLE 抖动不再清空协议,修复返回后设备误判断开
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-03 17:29:49 +08:00
17792275749andClaude Opus 4.7 97bf4674c0 fix(connectedWifi): 修正密码显隐图标切换逻辑
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-03 16:03:29 +08:00
17792275749andClaude Opus 4.7 bf501de628 feat(detailedReport): 基础指标label写死缺失显示-、躯干四肢无数据隐藏
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-03 11:45:39 +08:00
17792275749andClaude Opus 4.7 fb7c33c05f feat(addUser): 身份证合法时未填姓名则前端先解析性别年龄生日
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-03 11:39:33 +08:00
17792275749andClaude Opus 4.7 8284bf107b feat(data): 体重差值按 weightDiff/weightTrend 动态渲染并区分增减颜色
- 差值图标与数值改用后端 weightDiff/weightTrend
- 首次测量/持平不显示差值块
- 增加红色、减少绿色

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-03 08:50:51 +08:00
17792275749andClaude Opus 4.7 e0f201f15c feat(supplementPersonal): 身高体重范围校验并失焦清空
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 19:44:56 +08:00
17792275749andClaude Opus 4.7 1dfda24645 feat(addUser): 生日不超今天、身高体重范围校验并失焦清空
- 出生年月 picker 限制到今天
- 身高 50-250cm、体重 20-300kg
- 失焦时越界值清空并提示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 19:44:53 +08:00
17792275749andClaude Opus 4.7 55cdeae1ba fix(addUser): 家庭用户身份证查询报错时提交前重新查询并重置状态
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 19:34:36 +08:00
17792275749andClaude Opus 4.7 4e51432b8a feat(userManagement): 删除成员确认文字区分他人添加
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 19:15:20 +08:00
17792275749andClaude Opus 4.7 8f5ccdd7e3 fix(supplementPersonal): 查询报错时提交前重新查询直到成功
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 19:15:14 +08:00
17792275749andClaude Opus 4.7 00394bf8c4 feat(userManagement): 运维模式隐藏一键添加本人并优化本人卡片与同步弹框
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 18:29:08 +08:00
17792275749andClaude Opus 4.7 e595ff9f64 fix(connectedDevice): 绑定失败读取接口返回的 msg
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 18:29:05 +08:00
17792275749andClaude Opus 4.7 8e3da13d52 feat(userManagement): 员工隐藏编辑按钮
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 16:51:03 +08:00
17792275749andClaude Opus 4.7 df48e3919d chore(connectedWifi): 附近WiFi刷新按钮常显
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 16:11:37 +08:00
17792275749andClaude Opus 4.7 a462feaa62 chore(connectedDevice): 恢复找不到设备帮助文案并优化权限引导
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 15:30:40 +08:00
17792275749andClaude Opus 4.7 0ffb3740fb feat(data): 历史记录列表卡片化改版
- 新增记录列表标题与总条数
- 每条记录展示体重及增减徽标、BMI与体脂率
- 新增加减号图标资源

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 11:13:45 +08:00
17792275749andClaude Opus 4.7 7a1e8942a9 feat(detailedReport): 基础指标完善评分单位、健康评价等级与BMI状态
- 健康评分补"分"单位
- 健康评价展示等级文案(如"亚健康")替代数值
- BMI名称后跟体型状态胶囊,颜色取底部刻度色

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-02 10:36:23 +08:00
17792275749andClaude Sonnet 4.6 680794702e fix(equipment): 连接设备增加超时与失败兜底,避免加载一直转圈
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 18:10:39 +08:00
17792275749andClaude Sonnet 4.6 4be9712000 chore(selectMemberDrawer): 空态增加提示文案
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 17:24:10 +08:00
17792275749andClaude Sonnet 4.6 f7dba359d3 chore(equipment): 调整绑定设备文案与已配对区块显示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 17:24:07 +08:00
17792275749andClaude Sonnet 4.6 6069367b90 feat(userManagement): 已删除成员禁止编辑删除并优化展示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 17:24:03 +08:00
17792275749andClaude Sonnet 4.6 1ef5c5d834 chore(userManagementSync): 完成对勾加粗
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 17:02:31 +08:00
17792275749andClaude Sonnet 4.6 95b6b7679b chore: 升级 ppScale 插件版本至 0.0.32
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 17:02:28 +08:00
17792275749andClaude Sonnet 4.6 8d69249147 feat: 接口错误处理增强,统一打印并展示后端错误信息
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 16:57:28 +08:00
17792275749andClaude Sonnet 4.6 85523109f6 feat(userManagement): 添加用户上限 10 位校验
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 16:57:19 +08:00
17792275749andClaude Sonnet 4.6 b90c79df9f feat(userManagementSync): 同步弹框增加转圈圈与完成对勾
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-01 16:56:46 +08:00
17792275749andClaude Opus 4.7 effd4f2068 fix(addUser): 姓名输入框补绑 blur,先输身份证后输姓名也能触发计算
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-01 16:11:04 +08:00
17792275749andClaude Opus 4.7 bbd6781a27 chore(userManagement): 调整设备卡片展示字段与文案
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-01 15:18:39 +08:00
17792275749andClaude Opus 4.7 fe3e0a7f0a chore(selectMemberDrawer): 标题栏增加图标并调整文案
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-01 15:16:47 +08:00
17792275749andClaude Opus 4.7 90c0ff65da chore(equipment): 调整设备卡片展示字段与文案
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-01 12:42:30 +08:00
17792275749andClaude Opus 4.7 d5b1bfb31a chore(connectedDevice): 隐藏帮助文案与 deviceId 调试信息
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-01 12:42:01 +08:00
17792275749andClaude Opus 4.7 322440b9c7 fix(connectedDevice): 返回时恢复被扫描打断的连接
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-01 12:41:58 +08:00
17792275749andClaude Opus 4.7 c0bc61621b feat(connectedWifi): 配网成功展示完成并隐藏刷新,未配网展示跳过
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-01 11:57:28 +08:00
17792275749andClaude Opus 4.7 13d23376c2 fix(detailedReport): BMI 刻度落点按四段分界计算并计入色块间隙
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-28 15:49:08 +08:00
17792275749andClaude Opus 4.7 5a6281c9d8 fix(equipment): 取消配对时断开当前连接设备并清缓存
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-28 15:49:05 +08:00
17792275749andClaude Opus 4.7 5b9a66afc7 fix(addUser): 员工编号查询接口版本 v6 调整为 v5
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-28 15:49:01 +08:00
17792275749andClaude Opus 4.7 b94a6780f0 feat(env): 新增环境识别,网关地址按环境自动切换
- 新增 utils/env,用 wx.getAccountInfoSync().miniProgram.envVersion 识别 develop/trial/release
- request 与 lefu 的地址由硬编码改为按环境映射,develop/trial 走测试网关,release 走正式网关

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-28 11:59:44 +08:00
17792275749andClaude Opus 4.7 b4b2d2c7f3 fix(connectedDevice): 连接后等 SN 到位再绑定,拿不到 SN 时断开重置
- 连接成功后同时监听 deviceConnect 与 deviceInfo,两个信号都到位才调绑定接口,避免空 SN 绑定
- 15 秒超时仍拿不到 SN 时断开连接、清缓存、重置页面状态

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-28 11:38:52 +08:00
17792275749andClaude Opus 4.7 4d39449a0d fix(connectedDevice): 连接后绑定设备成功再跳转,失败时重置状态
- 手动/自动连接成功后 bindDevice 接口成功才缓存设备并跳配网
- bindDevice 失败时断开连接、清缓存、重置页面状态

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-27 18:16:41 +08:00
17792275749andClaude Opus 4.7 9a307783f9 feat(userManagement): 成员列表增加已删除状态展示
- delFlag=1 的成员显示「已删除」红色状态
- 已删除成员卡片半透明

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-27 14:48:34 +08:00
17792275749andClaude Opus 4.7 dbb2ab8423 fix: 修复蓝牙连接误报与 WiFi 列表获取问题,完善一键添加本人
- connectedDevice 忽略 connect 过程中的 UNAVAILABLE 抖动,避免误报蓝牙关闭
- getWifiList 加 settled 保护,onStartSearch 加防重入
- userManagement 一键添加本人(仅加后台、不下发设备)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-27 14:02:21 +08:00
17792275749andClaude Opus 4.7 b4d3a034ba fix(detailedReport): 卡片无数据时隐藏整卡,wx:if 统一写 block 上
- 删除多余的 isEightElectrode 字段
- 各指标卡片 rows 为空时不渲染标题
- wx:if 统一移到 block 上,符合 wxml 规范

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-26 16:08:37 +08:00
17792275749andClaude Opus 4.7 92de746f9e fix(userManagement): 下发用户改用 userId,修正误用记录主键 id
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-26 14:32:31 +08:00
17792275749andClaude Opus 4.7 f771bb97d6 feat(userManagement): 同步支持删除标记,完成后统一刷新列表
- 列表含 delFlag=1 时清空设备后下发未删除用户并全量上报
- 长按标题清空重下发、不上报
- 同步完成统一重新拉取用户列表,前端不本地维护同步状态

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-26 09:53:22 +08:00
17792275749andClaude Opus 4.7 548c26cad5 feat: 数据补传改为整包上传,帮助中心补空状态
- equipment 数据补传一次上传整个列表(list 参数),注释掉 memberId
- helpCenter 问题列表补空数据展示
- userManagement 删除成员接口 v2 调整为 v6
- my 页面按钮字体加粗

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-26 09:07:35 +08:00
17792275749andClaude Opus 4.7 c4bde77fd1 style(userManagement): 设备图标加最小宽度
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 21:11:48 +08:00
17792275749andClaude Opus 4.7 f3f4d56ceb fix(equipment): 回前台自动重连后同步设备连接状态
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 21:11:42 +08:00
17792275749andClaude Opus 4.7 e95d28a87b feat(lefu): 切后台挂起连接、回前台自动重连
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 20:57:00 +08:00
17792275749andClaude Opus 4.7 3dea0382f7 feat(equipment): 数据补传读取并上传历史数据
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 20:18:38 +08:00
17792275749andClaude Opus 4.7 d59aad4f44 fix(userManagement): 编辑传主键id与成员来源标注
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 19:20:30 +08:00
17792275749andClaude Opus 4.7 48b75f37c9 feat(userManagement): 成员编辑删除与运维模式接口区分
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 19:06:03 +08:00
17792275749andClaude Opus 4.7 2afe598881 feat(ops): 设备与绑定接口接入运维模式路径区分
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 19:05:58 +08:00
17792275749andClaude Opus 4.7 431be11ecd feat(equipment): 设备WIFI跳转与数据补传入口
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 16:12:00 +08:00
17792275749andClaude Opus 4.7 2595080d9a feat(userManagement): 同步前读设备主用户并支持长按清空重新下发
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 16:11:55 +08:00
17792275749andClaude Opus 4.7 f6d6591c69 feat(equipment): 接入运维模式开关与编辑用户 mode 字段
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 14:12:29 +08:00
17792275749andClaude Opus 4.7 2e07a7fcee feat(equipment): 设备列表升级 v6 接口并接入取消配对
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 13:51:15 +08:00
17792275749andClaude Opus 4.7 5572c2212a style(selectMemberDrawer): 简化成员头像为性别图片
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 11:49:01 +08:00
17792275749andClaude Opus 4.7 f8047c3eef style: 头像改用性别图片
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 11:46:47 +08:00
17792275749andClaude Opus 4.7 0bf50f7ff4 style(selectMemberDrawer): 调整选择用户抽屉布局
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 11:21:47 +08:00
17792275749andClaude Opus 4.7 76879270ba feat(home): 首页接入最新测量数据与空态
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 11:00:58 +08:00
17792275749andClaude Opus 4.7 e69db66eab feat(my): 个人信息页回显缓存用户信息与单位部门字段
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 10:43:47 +08:00
17792275749andClaude Opus 4.7 18704cbb76 feat(data): 历史数据页接入统计与历史接口,切换用户抽屉接真实成员
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-25 10:43:44 +08:00
17792275749andClaude Sonnet 4.6 0fcb6eebef feat(my): 我的页新增退出登录,清空 lefu 与本地信息
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 19:39:42 +08:00
17792275749andClaude Sonnet 4.6 4b61c882a1 feat(addUser): 添加用户模块接入员工查询与身份证复用
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 19:31:04 +08:00
17792275749andClaude Sonnet 4.6 a80a5cd939 feat(userManagement): 设备成员管理接入成员列表接口与同步标记
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 19:00:36 +08:00
17792275749andClaude Sonnet 4.6 f750d15150 fix(device): 修复设备切换连接订阅累积与自动重连,连接后更新缓存
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 17:06:27 +08:00
17792275749andClaude Sonnet 4.6 6ffda3f3f3 feat(equipment): 设备列表接入真实接口并调整字段映射
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 15:44:55 +08:00
17792275749andClaude Sonnet 4.6 17113759b8 feat(device): 连接设备后订阅设备信息并绑定 SN 到用户
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 15:31:46 +08:00
17792275749andClaude Sonnet 4.6 e25e797b35 feat(home,my): 首页和我的页从缓存回显用户信息
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 15:31:12 +08:00
17792275749andClaude Sonnet 4.6 90f84cc7df feat(user): 补充个人信息页接入身份证已存在复用弹框与登录引导
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 11:54:33 +08:00
17792275749andClaude Sonnet 4.6 9911dea32f feat(lefu): 配网状态码描述映射,失败按状态码返回对应提示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 10:31:28 +08:00
17792275749andClaude Sonnet 4.6 31b745f2ab feat(device): 引导检查附近设备权限,点击拉起系统授权设置
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 10:05:19 +08:00
17792275749andClaude Sonnet 4.6 6fe36f59fe fix(device): 扫描前检查系统蓝牙/定位开关,定位关闭时主动提示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-24 09:12:10 +08:00
17792275749andClaude Opus 4.7 9a81092c99 feat(userManagement): 接入用户同步到设备,恢复清空设备用户能力
- service 恢复 clearDeviceMembers/syncMembersToDevice,操作中断开立即失败
- syncMembersToDevice 只负责逐个下发,参数由业务层组装
- _doReconnect 增加蓝牙不可用判断
- userManagement 接入真实同步(连接状态实时同步 + 进度弹框)
- equipment 页增加用户管理入口

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-21 11:08:04 +08:00
17792275749andClaude Opus 4.7 db865748f2 fix(device): 修复设备连接与配网多场景问题,同名设备用 deviceId 区分
- 连接中关闭蓝牙立即结束 loading,不再卡到超时
- onShow 已连接时同步标记,重新搜索不误标已连接设备
- 连接中防重入,搜索中切后台重置状态
- 配网成功立即退出配网模式,密码必填且 8-16 位
- 配网失败重试定时器可清理
- 同名设备改用 deviceId 唯一标识并展示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-21 09:35:18 +08:00
17792275749andClaude Opus 4.7 d6e59df4e9 feat: 详细报告接入 v3 测量历史接口,设备列表接入设备接口
- 详细报告按 scaleType 区分 4/8 电极渲染,节段卡片 8 电极专属
- 设备列表改为接口驱动并新增空态
- 登录后统一跳首页,请求层兼容 code 0 返回风格

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 17:20:07 +08:00
17792275749 fce9701254 feat(helpCenter): 帮助中心列表接入内容接口、问题详情页富文本渲染 2026-08-20 17:13:57 +08:00
17792275749andClaude Opus 4.7 f53f11e6e9 feat(lefu): 迁移乐福体脂秤 SDK,接入设备扫描连接与 WiFi 配网
- 新增 lefu 服务层(扫描/连接/断开/保活重连/测量回调/WiFi 配网),事件回调支持多监听
- connectedDevice 接入真实蓝牙扫描连接,修复断线重连 UI 未同步、蓝牙/定位开关误判
- connectedWifi 接入真实 WiFi 配网,补连接状态校验与退出配网模式
- 新增 5 张设备图标并调整应用入口

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 15:57:16 +08:00
17792275749andClaude Sonnet 4.6 feb494080c feat(supplementPersonal): 保存后跳转首页、身高标必填、sn 参数改为可选
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-20 14:09:51 +08:00
17792275749andClaude Sonnet 4.6 e5f76fc0a9 fix(request): 接口响应字段由 data 统一为 result 并调整成功码判断
ApiResponse 业务数据字段由 data 改为 result,成功码由字符串 '00000' 改为数字 200,
登录与补充资料页面同步改为读取 res.result。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-20 11:19:03 +08:00
17792275749andClaude Opus 4.7 cdef8e6513 fix(detailedReport): 基础指标刻度条补充当前值标记圆圈
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 10:40:36 +08:00
17792275749andClaude Opus 4.7 090b33d0b3 feat(detailedReport): 新增躯干四肢脂肪与肌肉进阶成分网格卡片
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 10:34:48 +08:00
17792275749andClaude Opus 4.7 1f5cc2c743 feat(detailedReport): 详细报告身体指标卡片静态实现
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 10:18:33 +08:00
17792275749andClaude Opus 4.7 01bbcdecaf feat(detailedReport): 完善详细报告指标数据与卡片结构
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 10:03:26 +08:00
17792275749andClaude Opus 4.7 92b395b8bd feat(detailedReport): 完善详细报告页面布局与图标资源
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 09:28:26 +08:00
17792275749andClaude Opus 4.7 f13edf31b7 feat(navBar): 新增自定义导航栏组件,接入详细报告与我的页面
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 08:42:21 +08:00
17792275749andClaude Opus 4.7 48ac39f0e0 feat(userManagement): 用户列表按本人/员工/家庭用户分组展示
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 16:33:48 +08:00
17792275749andClaude Opus 4.7 97dffd9893 feat(equipment): 设备页用户按钮接入用户管理入口
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 16:01:45 +08:00
17792275749andClaude Opus 4.7 3e0d260fdc feat(userManagement): 用户管理新增空态与同步进度弹框组件
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 15:58:28 +08:00
17792275749andClaude Opus 4.7 9040fc4fba feat(userManagement): 新增用户管理页面并接入导航
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 15:29:53 +08:00
17792275749andClaude Opus 4.7 b66caf515e feat(addUser): 新增添加用户页面
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 15:20:55 +08:00
17792275749andClaude Opus 4.7 21020a23b3 feat(equipment): 弹框组件新增转圈加载图标
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 14:42:27 +08:00
17792275749andClaude Opus 4.7 eaec08a6e4 feat(equipment): 实现设备管理页面,新增运维模式与配对/补传弹框
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 14:27:51 +08:00
17792275749andClaude Opus 4.7 3a67b26ed6 feat(my): 新增个人信息、帮助中心、问题详情页面并接入导航
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 09:53:56 +08:00
17792275749andClaude Opus 4.7 cd11d711d5 style(data): 选择成员抽屉对齐设计稿样式并填充静态成员数据
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-19 09:13:37 +08:00
17792275749andClaude Sonnet 4.6 7105363e13 feat(device): 新增搜索设备与 WiFi 配网页面,暂用假数据填充
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-17 18:19:38 +08:00
17792275749andClaude Sonnet 4.6 3c62c31b5d feat(data): 数据页接入选择成员抽屉,简化抽屉实现并复用空态组件
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-17 15:59:41 +08:00
17792275749andClaude Sonnet 4.6 0c8285f390 feat(data,my): 实现数据页与我的页界面,新增选择成员抽屉组件
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-17 15:48:07 +08:00
17792275749andClaude Sonnet 4.6 6ad51b00b1 style(home): 替换首页背景图并调整卡片样式,新增设备连接入口
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-17 15:06:07 +08:00
17792275749andClaude Sonnet 4.6 8069b2767b refactor(home): 重构首页布局与样式,改用静态示例数据占位
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-17 14:47:43 +08:00
17792275749andClaude Sonnet 4.6 b264205cf4 feat: 新增首页、设备、数据、我的页面及底部 tabBar 导航
扩展应用结构,接入底部导航;完善个人信息页提交文案与校验代码风格。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-17 13:46:52 +08:00
17792275749andClaude Sonnet 4.6 83d909b95b refactor: 项目重构,仅保留 login 和 supplementPersonal 页面
删除 11 个旧页面、组件、lefu SDK、旧资源文件。
新增 request 封装(GET/POST/PUT)、api 层、utils/common 身份证工具。
重写 login(登录流程提取到 app.ts) 和 supplementPersonal(简化表单逻辑)。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-10 14:21:00 +08:00
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
17792275749andClaude Opus 4.7 ea52c495f6 [AI Generated]: feat(device): 配网/绑定后下发主用户到设备并兜底超时
- configWifi 加 20s 超时与 settled 互锁,避免回调不触发导致 loading 死转
- supplementPersonal 提交后、connectedWifi 二次配网确认后均下发主用户
- 设备成员唯一标识从 idCard 切换为 userId,清理 MemberDisplay.idCard

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:56:44 +08:00
17792275749 e4404a6b0c codeSyncTime 2026-05-19 16:13:31 +08:00
17792275749 c05239e7e2 添加MTU的问题 2026-05-19 15:52:54 +08:00
17792275749 d45adc14c0 处理图标的问题 2026-05-19 11:46:49 +08:00
17792275749 11bdf65df4 [AI Generated]: perf(assets): 压缩设备图片与分享图,减小体积 2026-05-18 10:30:38 +08:00
17792275749 09697b99e4 [AI Generated]: fix(*): 首页连接文案改为「设备已连接」,成员详情接口切换至 v3 2026-05-18 10:22:50 +08:00
17792275749 4b1ff061fa [AI Generated]: feat(*): 新增 autoConnect 自动重连机制、OTA 断连兜底触发,修复 diff 为零时颜色与箭头展示异常 2026-05-18 10:11:41 +08:00
17792275749 64029c80b1 [AI Generated]: feat(home): 新增设备固件 OTA 自动检测与强制升级,页面生命周期内仅触发一次 2026-05-18 09:51:47 +08:00
17792275749 49b356335e [AI Generated]: fix(lefu): 修复蓝牙断连后 isConnected 误报及重连无效问题,新增 equipmentMember 页 onShow 兜底注释 2026-05-18 09:30:36 +08:00
17792275749 ce586bf6ae [AI Generated]: style(*): 移除设备图标占位背景色 2026-05-15 17:59:44 +08:00
17792275749 1f0aa9da18 [AI Generated]: feat(*): 各页面设备图标改为根据 modelNumber 动态加载本地图片 2026-05-15 17:57:33 +08:00
17792275749 bcf9f48dd9 [AI Generated]: feat(*): 完善成员下发进度提示、头像取首字、图片资源分目录及选人回填逻辑优化 2026-05-15 17:53:10 +08:00
17792275749 69ad8358ae [AI Generated]: feat(*): 完善数据页切换成员、首页接口对接及我的页缓存信息展示 2026-05-15 17:29:37 +08:00
17792275749 24d3677415 [AI Generated]: feat(equipment): 连接与自动重连改为扫描匹配 deviceId 后再建立连接 2026-05-15 16:54:09 +08:00
17792275749 33b6939cc6 [AI Generated]: fix(*): 更新乐福域名配置至207、修复配网日志及优化设备扫描隐藏逻辑 2026-05-15 16:45:41 +08:00
17792275749 b6862c44d5 [AI Generated]: fix(*): 移除废弃 WifiVersion 类型、修复 connectedWifi 事件绑定及升级 ppScale-plugin 至 0.0.25 2026-05-15 16:26:02 +08:00
17792275749 24d0ebec23 [AI Generated]: feat(*): 完善数据页切换成员、首页接口对接及我的页缓存信息展示 2026-05-15 15:40:33 +08:00
17792275749 db74e0fdc9 [AI Generated]: feat(*): 完善数据页切换成员、首页接口对接及我的页缓存信息展示 2026-05-15 15:06:01 +08:00
17792275749 fbef06b5c2 [AI Generated]: feat(*): 完善数据页切换成员、首页接口对接及我的页缓存信息展示 2026-05-15 14:30:30 +08:00
17792275749 e0573857e0 [AI Generated]: feat(*): 对接数据页/测量报告真实接口,完善成员管理、蓝牙连接及成员选择抽屉逻辑 2026-05-15 14:10:27 +08:00
17792275749 5f9232572f [AI Generated]: feat(*): 对接登录token存储、设备列表自动连接及成员管理蓝牙状态实时同步 2026-05-15 10:57:20 +08:00
17792275749 422d645c00 [AI Generated]: feat(*): 对接v3设备列表及成员管理接口,补全字段并接入蓝牙连接状态 2026-05-14 21:06:32 +08:00
17792275749 d8621ebce6 [AI Generated]: feat(*): 完善个人信息页新增体重字段、身份证服务端校验及用户信息更新接口 2026-05-14 20:50:26 +08:00
17792275749 b39bd7cb8d [AI Generated]: fix(*): 优化配网协议版本自动判断,改由configWifi内部根据modelNumber决定domain版本 2026-05-14 20:31:05 +08:00
17792275749 5c8370b943 [AI Generated]: fix(*): 修复乐福SDK二次连接问题,对齐demo挂载顺序并完善页面状态重置 2026-05-14 19:56:00 +08:00
17792275749 00a1529256 [AI Generated]: feat(*): 修复连接设备页及配网页交互逻辑、蓝牙状态显示与设备名获取 2026-05-14 17:18:10 +08:00
17792275749 29680cb7a4 [AI Generated]: feat(Views): 完善连接设备页交互逻辑、波纹动画及中心图标样式 2026-05-14 13:41:50 +08:00
17792275749 54fc0daf5a [AI Generated]: feat(*): 新增 OpenID 登录流程及启动自动跳转逻辑 2026-05-14 11:56:43 +08:00
17792275749 89d4832c7c [AI Generated]: feat(*): 补全分享功能、新增 lefu OTA 升级封装及多环境请求配置 2026-05-14 11:01:59 +08:00
17792275749 3f12e34afd [AI Generated]: feat(*): 新增 lefu 蓝牙服务层、mock 业务数据层及 request 请求封装,接入各页面 2026-05-13 16:18:14 +08:00
17792275749 38d6f0867a [AI Generated]: feat(Comp): 新增选择已有成员抽屉组件并接入 addMember 页面 2026-05-13 11:47:41 +08:00
17792275749 afa602dff9 [AI Generated]: refactor(Views): 优化测量报告页面结构与样式 2026-05-13 11:19:32 +08:00
17792275749 d1331437fa [AI Generated]: feat(Views): 新增测量报告页面 2026-05-13 09:55:15 +08:00
17792275749 780a1e3202 [AI Generated]: feat(Views): 优化首页空态展示效果 2026-05-13 09:32:04 +08:00
17792275749 98a763d4f6 [AI Generated]: refactor(Views): 首页卡片分离命名 weight-card/detail-card 2026-05-13 09:28:00 +08:00
17792275749 ce49b77f17 [AI Generated]: feat(Views): 优化设备页结构与样式细节 2026-05-12 16:02:38 +08:00
17792275749 d6c62a0672 [AI Generated]: feat(Views): 优化数据页数据卡交互与样式 2026-05-12 15:56:52 +08:00
17792275749 3b072173b5 [AI Generated]: feat(Views): 新增数据页历史记录结构与样式 2026-05-12 15:10:50 +08:00
17792275749 6a4f09e0a0 [AI Generated]: refactor(Views): 优化设备成员页结构与样式细节 2026-05-12 11:10:18 +08:00
17792275749 d520bc275a [AI Generated]: feat(Views): 新增设备成员页结构与样式及添加成员入口 2026-05-12 10:33:02 +08:00
17792275749 441baf66ad [AI Generated]: chore(*): 统一页面后缀为TS+LESS并清理searchDevice页 2026-05-12 09:47:40 +08:00
17792275749 3b4a5e1b0d [AI Generated]: feat(Views): 新增连接WiFi页五态状态机及密码连接交互 2026-05-12 09:36:55 +08:00
17792275749 b744f20537 [AI Generated]: refactor(Views): 重写连接WiFi页结构与样式并调整页面注册顺序 2026-05-12 09:23:56 +08:00
17792275749 b022044279 [AI Generated]: feat(Views): 新增设备管理页已配对设备列表及添加设备按钮 2026-05-11 18:49:06 +08:00
17792275749 6b3c7df349 [AI Generated]: fix(Views): 修复连接WiFi页已连接项图标多余底色圆 2026-05-11 18:32:06 +08:00
17792275749 a8cfed4b8b [AI Generated]: feat(Views): 新增连接WiFi页五态状态机及跳转完善个人信息 2026-05-11 18:15:36 +08:00
17792275749 5c923bf19a [AI Generated]: feat(Views): 新增完善个人信息页表单及身份证解析逻辑 2026-05-11 17:10:42 +08:00
17792275749 640966ae61 [AI Generated]: refactor(Views): 重构连接设备页设备列表为统一循环并补全卡片样式 2026-05-11 16:25:35 +08:00
17792275749 8b91edcef7 [AI Generated]: refactor(Views): 重构连接设备页搜索结果区为统一模块容器 2026-05-11 15:54:23 +08:00
183 changed files with 11095 additions and 945 deletions
+31
View File
@@ -0,0 +1,31 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# 环境变量文件(含敏感配置,禁止提交)
# .env
# .env.*
.mcp.json
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.claude
.turbo
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ClaudeCodeTabState">
<option name="tabCount" value="4" />
</component>
</project>
+2
View File
@@ -0,0 +1,2 @@
export { checkOpenIdLogin, getUserInfoByIdCard, updateUser } from './user'
export type { UserInfo, LoginResult } from './user'
+53
View File
@@ -0,0 +1,53 @@
import { get, post, put } from '../utils/request/index'
export interface UserInfo {
id: string
userId: string
parentUserId: string | null
scaleDeviceId: string
deviceId: string | null
deviceType: string
dataType: number
userType: string | null
idCard: string
height: number
weight: number
birthday: string
sex: number
avatar: string | null
phone: string | null
thirdId: string
realname: string
bmi: number
createBy: string
createTime: string
updateBy: string | null
updateTime: string | null
delFlag: number
sn: string | null
workNo: string | null
secondDepart: string | null
thirdDepart: string | null
remark: string | null
relationType: string | null
sex_dictText: string
connectDeviceInfo: string
flag?: number | null
}
export interface LoginResult {
user: UserInfo | null
token: string
}
/** OpenID 登录 */
export const checkOpenIdLogin = (code: string) =>
post<LoginResult>('weighingScale/v2/checkOpenIdLogin', { code })
/** 根据身份证号查询用户信息 */
export const getUserInfoByIdCard = (params: { sn?: string; idCard: string; realname: string }) =>
get<UserInfo | null>('weighingScale/v6/getUserInfoByIdcard', params, { loading: true, loadingTitle: '正在查询用户信息' })
/** 更新当前登录微信用户信息 */
export const updateUser = (data: Record<string, any>) =>
put<UserInfo>('weighingScale/v6/update/user', data)
+78 -60
View File
@@ -1,62 +1,80 @@
{
"pages": [
"pages/login/login",
"pages/searchDevice/searchDevice",
"pages/connectedDevice/connectedDevice",
"pages/connectedWifi/connectedWifi",
"pages/supplementPersonal/supplementPersonal",
"pages/home/home",
"pages/equipment/equipment",
"pages/data/data",
"pages/my/my"
],
"window": {
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "智能体重秤"
},
"style": "v2",
"rendererOptions": {
"skyline": {
"defaultDisplayBlock": true,
"disableABTest": true,
"sdkVersionBegin": "3.0.0",
"sdkVersionEnd": "15.255.255"
}
},
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents",
"tabBar": {
"color": "#999999",
"selectedColor": "#000000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "images/tabBar/home_default.png",
"selectedIconPath": "images/tabBar/home.png"
},
{
"pagePath": "pages/equipment/equipment",
"text": "设备",
"iconPath": "images/tabBar/equipment_default.png",
"selectedIconPath": "images/tabBar/equipment.png"
},
{
"pagePath": "pages/data/data",
"text": "数据",
"iconPath": "images/tabBar/data_default.png",
"selectedIconPath": "images/tabBar/data.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "images/tabBar/my_default.png",
"selectedIconPath": "images/tabBar/my.png"
}
]
}
"pages": [
"pages/login/login",
"pages/supplementPersonal/supplementPersonal",
"pages/connectedDevice/connectedDevice",
"pages/connectedWifi/connectedWifi",
"pages/home/home",
"pages/detailedReport/detailedReport",
"pages/equipment/equipment",
"pages/userManagement/userManagement",
"pages/addUser/addUser",
"pages/data/data",
"pages/my/my",
"pages/personalInformation/personalInformation",
"pages/helpCenter/helpCenter",
"pages/questionDetails/questionDetails"
],
"usingComponents": {
"empty-data": "/components/emptyData/emptyData"
},
"window": {},
"tabBar": {
"color": "#808080",
"selectedColor": "#1385FA",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "images/tabBar/home_default.png",
"selectedIconPath": "images/tabBar/home.png"
},
{
"pagePath": "pages/equipment/equipment",
"text": "设备",
"iconPath": "images/tabBar/equipment_default.png",
"selectedIconPath": "images/tabBar/equipment.png"
},
{
"pagePath": "pages/data/data",
"text": "数据",
"iconPath": "images/tabBar/data_default.png",
"selectedIconPath": "images/tabBar/data.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
"iconPath": "images/tabBar/my_default.png",
"selectedIconPath": "images/tabBar/my.png"
}
]
},
"style": "v2",
"rendererOptions": {
"skyline": {
"defaultDisplayBlock": true,
"disableABTest": true,
"sdkVersionBegin": "3.0.0",
"sdkVersionEnd": "15.255.255"
}
},
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents",
"plugins": {
"ppScale-plugin": {
"version": "0.0.32",
"provider": "wx0826af4e4908f524"
}
},
"permission": {
"scope.userLocation": {
"desc": "您的位置信息将用于发现附近的蓝牙设备,以便连接蓝牙秤。"
}
},
"requiredPrivateInfos": [
"getLocation"
]
}
+37 -11
View File
@@ -1,22 +1,48 @@
/**app.wxss**/
@import "./styles/index.less";
page {
width: 100%;
height: 100vh;
overflow: hidden;
box-sizing: border-box;
background: var(--color-bg);
/* 左右边距不加全局,避免全屏元素被挤 */
width: 100%;
height: 100vh;
overflow: hidden;
box-sizing: border-box;
background-color: #F5F5F5;
}
/* 需要页面标准边距的业务容器,在 WXML 根节点使用 */
.page-container {
padding-left: var(--page-padding-x);
padding-right: var(--page-padding-x);
padding-left: 30rpx;
padding-right: 30rpx;
}
image {
width: 100%;
height: 100%;
}
/* 全局 scroll-view 通用样式:同时兼容两种结构
* - page 内直接放 scroll-view:靠 height: 100% 撑满
* - page 内为 flex 列布局(header + scrollView + footer):靠 flex: 1 撑满剩余空间
*/
.scrollView {
flex: 1;
width: 100%;
height: 100%;
overflow: hidden;
box-sizing: border-box;
}
.arrow {
position: relative;
&::after {
position: absolute;
right: 24rpx;
top: 0;
bottom: 0;
margin: auto;
content: "";
width: 10rpx;
height: 10rpx;
border-left: 4rpx solid #b6b6b6;
border-top: 4rpx solid #b6b6b6;
transform: rotate(135deg);
}
}
+53 -17
View File
@@ -1,18 +1,54 @@
// app.ts
App<IAppOption>({
globalData: {},
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
import { leFuService } from './lefu/index'
// 登录
wx.login({
success: res => {
console.log(res.code)
// 发送 res.code 到后台换取 openId, sessionKey, unionId
},
})
},
})
App<IAppOption>({
globalData: {
operationsEngineer: false,
wasConnected: false
},
onLaunch() {
// 已登录则跳过登录页
const token = wx.getStorageSync('token') || null;
const userInfo = wx.getStorageSync('userInfo') || null;
// const userInfo = true;
if (token && userInfo) {
wx.reLaunch({
url: '/pages/home/home'
})
}
},
onHide() {
// 切后台:记录连接状态,挂起(断开但保留缓存设备,回前台可重连)
const wasConnected = leFuService.isConnected
this.globalData.wasConnected = wasConnected
if (wasConnected) {
leFuService.suspend()
}
},
onShow() {
// 回前台:如果之前连接过,自动重连
if (this.globalData.wasConnected) {
this.globalData.wasConnected = false
leFuService.autoConnect()
}
},
getWxLoginCode(): Promise<string> {
return new Promise((resolve, reject) => {
wx.login({
success: (res) => {
if (res.code) {
resolve(res.code)
} else {
reject(new Error('获取登录凭证失败'))
}
},
fail: (err) => {
reject(new Error(err.errMsg || '获取登录凭证失败'))
},
})
})
},
})
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,18 @@
.empty {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 80rpx;
.empty-icon {
width: 193rpx;
height: 138rpx;
margin-bottom: 30rpx;
}
.empty-text {
color: #808080;
font-size: 28rpx;
line-height: 28rpx;
}
}
@@ -0,0 +1,21 @@
// emptyData.ts
Component({
properties: {
text: {
type: String,
value: '暂无数据'
},
iconSrc: {
type: String,
value: '/images/emptyData.png'
},
containerStyle: {
type: String,
value: ''
},
textStyle: {
type: String,
value: ''
}
}
})
@@ -0,0 +1,6 @@
<view class="empty" style="{{containerStyle}}">
<view class="empty-icon">
<image src="{{iconSrc}}" mode="aspectFit" />
</view>
<view class="empty-text" style="{{textStyle}}">{{text}}</view>
</view>
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,62 @@
.equipment-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(37, 37, 53, 0.6);
z-index: 100;
}
.equipment-panel {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 560rpx;
box-sizing: border-box;
background-color: #FFFFFF;
border-radius: 24rpx;
z-index: 101;
display: flex;
flex-direction: column;
align-items: center;
padding: 64rpx 40rpx 56rpx;
.equipment-spinner {
width: 96rpx;
height: 96rpx;
border: 8rpx solid rgba(19, 133, 250, 0.2);
border-top-color: #1385FA;
border-radius: 50%;
animation: equipment-spin 1s linear infinite;
}
.equipment-title {
color: #252535;
height: 32rpx;
font-size: 32rpx;
line-height: 32rpx;
text-align: center;
margin-top: 40rpx;
}
.equipment-content {
color: #808080;
font-size: 24rpx;
line-height: 34rpx;
text-align: center;
margin-top: 24rpx;
white-space: pre-line;
}
}
@keyframes equipment-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@@ -0,0 +1,26 @@
Component({
properties: {
/** 是否显示弹框 */
show: {
type: Boolean,
value: false
},
/** 标题 */
title: {
type: String,
value: ''
},
/** 副标题(支持 \n 换行) */
content: {
type: String,
value: ''
}
},
methods: {
/** 点击遮罩关闭 */
onTapMask() {
this.triggerEvent('close')
}
}
})
@@ -0,0 +1,8 @@
<block wx:if="{{ show }}">
<view class="equipment-mask" bind:tap="onTapMask"></view>
<view class="equipment-panel">
<view class="equipment-spinner"></view>
<view class="equipment-title">{{ title }}</view>
<view class="equipment-content">{{ content }}</view>
</view>
</block>
@@ -0,0 +1,5 @@
{
"component": true,
"usingComponents": {},
"multipleSlots": true
}
+60
View File
@@ -0,0 +1,60 @@
.nav-spacer {
width: 100%;
}
.nav-wrap {
width: 100%;
}
.nav-content {
width: 100%;
display: flex;
align-items: center;
position: relative;
box-sizing: border-box;
}
.nav-left {
height: 100%;
flex-shrink: 0;
z-index: 1;
display: flex;
align-items: center;
}
.back-btn {
width: 60rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.back-arrow {
width: 18rpx;
height: 18rpx;
border-left: 4rpx solid #252535;
border-bottom: 4rpx solid #252535;
transform: rotate(45deg);
}
.nav-center {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 0;
pointer-events: none;
}
.nav-title {
color: #252535;
font-size: 16px;
font-weight: bold;
line-height: 1;
pointer-events: auto;
}
+61
View File
@@ -0,0 +1,61 @@
import { getNavBarLayout } from '../../utils/navBar/index';
Component({
options: {
multipleSlots: true,
},
properties: {
title: { type: String, value: '' },
back: { type: String, value: 'auto' },
fixed: { type: Boolean, value: false },
zIndex: { type: Number, value: 100 },
bgColor: { type: String, value: 'transparent' },
color: { type: String, value: '#252535' },
arrowColor: { type: String, value: '#252535' },
},
data: {
statusBarHeight: 0,
navBarHeight: 44,
totalNavHeight: 0,
navPaddingRight: 0,
_showBack: false,
_spacerHeight: 'auto',
_navStyle: '',
},
lifetimes: {
attached() {
const layout = getApp<IAppOption>().globalData.navBarLayout || getNavBarLayout();
this._applyLayout(layout);
},
},
observers: {
'fixed, back, zIndex'(_fixed: boolean, _back: string, _zIndex: number) {
const layout = getApp<IAppOption>().globalData.navBarLayout || getNavBarLayout();
this._applyLayout(layout);
},
},
methods: {
_applyLayout(layout: ReturnType<typeof getNavBarLayout>) {
const { fixed, back, zIndex } = this.properties;
const _showBack = back === 'show' || (back === 'auto' && getCurrentPages().length > 1);
this.setData({
...layout,
_showBack,
_spacerHeight: fixed ? layout.totalNavHeight + 'px' : 'auto',
_navStyle: fixed
? `position: fixed; top: 0; left: 0; right: 0; z-index: ${zIndex};`
: '',
});
},
onBack() {
wx.navigateBack({ delta: 1 });
},
},
});
+18
View File
@@ -0,0 +1,18 @@
<view class="nav-spacer" style="height: {{_spacerHeight}}; {{_navStyle}}">
<view class="nav-wrap" style="background-color: {{bgColor}};">
<view style="height: {{statusBarHeight}}px;"></view>
<view class="nav-content" style="height: {{navBarHeight}}px; padding-right: {{navPaddingRight}}px;">
<view class="nav-left">
<block wx:if="{{_showBack}}">
<view class="back-btn" bind:tap="onBack">
<view class="back-arrow" style="border-left-color: {{arrowColor}}; border-bottom-color: {{arrowColor}};"></view>
</view>
</block>
<slot name="left" />
</view>
<view class="nav-center">
<text class="nav-title" style="color: {{color}};">{{title}}</text>
</view>
</view>
</view>
</view>
@@ -1,5 +0,0 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {}
}
@@ -1,96 +0,0 @@
.weui-navigation-bar {
--weui-FG-0:rgba(0,0,0,.9);
--height: 44px;
--left: 16px;
}
.weui-navigation-bar .android {
--height: 48px;
}
.weui-navigation-bar {
overflow: hidden;
color: var(--weui-FG-0);
flex: none;
}
.weui-navigation-bar__inner {
position: relative;
top: 0;
left: 0;
height: calc(var(--height) + env(safe-area-inset-top));
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding-top: env(safe-area-inset-top);
width: 100%;
box-sizing: border-box;
}
.weui-navigation-bar__left {
position: relative;
padding-left: var(--left);
display: flex;
flex-direction: row;
align-items: flex-start;
height: 100%;
box-sizing: border-box;
}
.weui-navigation-bar__btn_goback_wrapper {
padding: 11px 18px 11px 16px;
margin: -11px -18px -11px -16px;
}
.weui-navigation-bar__btn_goback_wrapper.weui-active {
opacity: 0.5;
}
.weui-navigation-bar__btn_goback {
font-size: 12px;
width: 12px;
height: 24px;
-webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
-webkit-mask-size: cover;
mask-size: cover;
background-color: var(--weui-FG-0);
}
.weui-navigation-bar__center {
font-size: 17px;
text-align: center;
position: relative;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-weight: bold;
flex: 1;
height: 100%;
}
.weui-navigation-bar__loading {
margin-right: 4px;
align-items: center;
}
.weui-loading {
font-size: 16px;
width: 16px;
height: 16px;
display: block;
background: transparent url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A") no-repeat;
background-size: 100%;
margin-left: 0;
animation: loading linear infinite 1s;
}
@keyframes loading {
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
}
@@ -1,105 +0,0 @@
Component({
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/**
* 组件的属性列表
*/
properties: {
extClass: {
type: String,
value: ''
},
title: {
type: String,
value: ''
},
background: {
type: String,
value: ''
},
color: {
type: String,
value: ''
},
back: {
type: Boolean,
value: true
},
loading: {
type: Boolean,
value: false
},
homeButton: {
type: Boolean,
value: false,
},
animated: {
// 显示隐藏的时候opacity动画效果
type: Boolean,
value: true
},
show: {
// 显示隐藏导航,隐藏的时候navigation-bar的高度占位还在
type: Boolean,
value: true,
observer: '_showChange'
},
// back为true的时候,返回的页面深度
delta: {
type: Number,
value: 1
},
},
/**
* 组件的初始数据
*/
data: {
displayStyle: ''
},
lifetimes: {
attached() {
const rect = wx.getMenuButtonBoundingClientRect()
wx.getSystemInfo({
success: (res) => {
const isAndroid = res.platform === 'android'
const isDevtools = res.platform === 'devtools'
this.setData({
ios: !isAndroid,
innerPaddingRight: `padding-right: ${res.windowWidth - rect.left}px`,
leftWidth: `width: ${res.windowWidth - rect.left }px`,
safeAreaTop: isDevtools || isAndroid ? `height: calc(var(--height) + ${res.safeArea.top}px); padding-top: ${res.safeArea.top}px` : ``
})
}
})
},
},
/**
* 组件的方法列表
*/
methods: {
_showChange(show: boolean) {
const animated = this.data.animated
let displayStyle = ''
if (animated) {
displayStyle = `opacity: ${
show ? '1' : '0'
};transition:opacity 0.5s;`
} else {
displayStyle = `display: ${show ? '' : 'none'}`
}
this.setData({
displayStyle
})
},
back() {
const data = this.data
if (data.delta) {
wx.navigateBack({
delta: data.delta
})
}
this.triggerEvent('back', { delta: data.delta }, {})
}
},
})
@@ -1,64 +0,0 @@
<view class="weui-navigation-bar {{extClass}}">
<view class="weui-navigation-bar__inner {{ios ? 'ios' : 'android'}}" style="color: {{color}}; background: {{background}}; {{displayStyle}}; {{innerPaddingRight}}; {{safeAreaTop}};">
<!-- 左侧按钮 -->
<view class='weui-navigation-bar__left' style="{{leftWidth}};">
<block wx:if="{{back || homeButton}}">
<!-- 返回上一页 -->
<block wx:if="{{back}}">
<view class="weui-navigation-bar__buttons weui-navigation-bar__buttons_goback">
<view
bindtap="back"
class="weui-navigation-bar__btn_goback_wrapper"
hover-class="weui-active"
hover-stay-time="100"
aria-role="button"
aria-label="返回"
>
<view class="weui-navigation-bar__button weui-navigation-bar__btn_goback"></view>
</view>
</view>
</block>
<!-- 返回首页 -->
<block wx:if="{{homeButton}}">
<view class="weui-navigation-bar__buttons weui-navigation-bar__buttons_home">
<view
bindtap="home"
class="weui-navigation-bar__btn_home_wrapper"
hover-class="weui-active"
aria-role="button"
aria-label="首页"
>
<view class="weui-navigation-bar__button weui-navigation-bar__btn_home"></view>
</view>
</view>
</block>
</block>
<block wx:else>
<slot name="left"></slot>
</block>
</view>
<!-- 标题 -->
<view class='weui-navigation-bar__center'>
<view wx:if="{{loading}}" class="weui-navigation-bar__loading" aria-role="alert">
<view
class="weui-loading"
aria-role="img"
aria-label="加载中"
></view>
</view>
<block wx:if="{{title}}">
<text>{{title}}</text>
</block>
<block wx:else>
<slot name="center"></slot>
</block>
</view>
<!-- 右侧留空 -->
<view class='weui-navigation-bar__right'>
<slot name="right"></slot>
</view>
</view>
</view>
@@ -1,3 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,189 @@
/* 遮罩层 */
.drawer-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(37, 37, 53, 0.6);
z-index: 100;
opacity: 0;
transition: opacity 0.3s ease;
&--visible {
opacity: 1;
}
}
/* 抽屉面板 */
.drawer-panel {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 85vh;
background-color: #FFFFFF;
border-radius: 24rpx 24rpx 0 0;
z-index: 101;
display: flex;
flex-direction: column;
transform: translateY(100%);
transition: transform 0.3s ease;
&--visible {
transform: translateY(0);
}
}
/* 拖拽把手 */
.drawer-handle {
width: 72rpx;
height: 6rpx;
background-color: #77849E;
border-radius: 3rpx;
margin: 32rpx auto 0;
}
/* 标题栏 */
.drawer-header {
width: 100%;
height: 100rpx;
padding: 30rpx;
box-sizing: border-box;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
border-bottom: 2rpx solid #EAEDF1;
.drawer-icon {
width: 40rpx;
height: 40rpx;
}
.drawer-title {
color: #252535;
height: 40rpx;
font-size: 32rpx;
font-weight: bolder;
line-height: 40rpx;
}
/* 关闭按钮 */
.drawer-close {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
.drawer-close-icon {
width: 28rpx;
height: 28rpx;
position: relative;
&::before,
&::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 3rpx;
background-color: #252535;
border-radius: 2rpx;
}
&::before {
transform: translate(-50%, -50%) rotate(45deg);
}
&::after {
transform: translate(-50%, -50%) rotate(-45deg);
}
}
}
}
/* 用户滚动列表 */
.drawer-user-list {
flex: 1;
overflow: hidden;
}
.scrollViewContent {
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
/* 用户行 */
.member-item {
width: 100%;
display: flex;
flex-wrap: nowrap;
align-items: center;
padding: 24rpx 0;
border-bottom: 2rpx solid #EAEDF1;
/* 纯色占位头像 */
.member-avatar-placeholder {
width: 90rpx;
height: 90rpx;
border-radius: 24rpx;
}
/* 姓名 + 副标题 */
.member-info {
flex: 1;
height: 78rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 23rpx;
.member-name {
color: #333333;
height: 32rpx;
font-size: 32rpx;
font-weight: 500;
line-height: 32rpx;
white-space: nowrap;
}
.member-sub {
color: #77849E;
height: 34rpx;
font-size: 26rpx;
line-height: 34rpx;
white-space: nowrap;
}
}
.member-type {
height: 40rpx;
flex-shrink: 0;
.member-type-tag {
height: 40rpx;
padding: 0 14rpx;
font-size: 22rpx;
line-height: 40rpx;
border-radius: 6rpx;
}
.member-type-tag--self {
color: #1385FA;
background-color: rgba(19, 133, 250, 0.12);
}
.member-type-tag--employee {
color: #10B981;
background-color: rgba(16, 185, 129, 0.12);
}
.member-type-tag--family {
color: #F59E0B;
background-color: rgba(245, 158, 11, 0.12);
}
}
}
}
@@ -0,0 +1,189 @@
import { get } from '../../utils/request/index'
import { leFuService } from '../../lefu/index'
import { calcAge } from '../../utils/idCard/index'
/** GET /weighingScale/v5/select/addMembers/user 返回的单条结构 */
interface AddMemberApiItem {
id: string
realname: string
sex_dictText: '男' | '女'
birthday: string
height: number
weight: number
idCard: string | null
avatar: string | null
dataType?: number
relationType?: number | string | null
}
/** GET /weighingScale/v3/select/history/user 返回的单条结构 */
interface HistoryApiItem {
id: string
userId: string
realname: string
sex: number
height: number
birthday: string
avatar: string | null
relationType: number | string | null
dataType?: number
}
/** 抽屉内部用户项(含回填所需全量字段) */
interface ExistingMember {
id: string
name: string
gender: '男' | '女'
age: number
height: number
weight: number
idCard: string
avatar?: string
selected?: boolean
/** history 模式额外携带,供页面构建 userInfo */
userId?: string
sex?: number
birthday?: string
relationType?: number | string | null
/** 0=员工 1=家庭成员 */
dataType?: number
}
/**
* 选择已有用户抽屉组件
* Properties: show(控制显示)、source(数据来源:addMember/history)、excludeUserId(排除用户)
* Events: close(关闭), select(选中用户,携带 ExistingMember)
*/
Component({
properties: {
/** 是否显示抽屉 */
show: {
type: Boolean,
value: false
},
/** 数据来源模式:addMember=新增用户选择 / history=历史数据切换用户 */
source: {
type: String,
value: 'addMember'
},
/** 需要排除的用户 ID(history 模式下排除当前查看的用户) */
excludeUserId: {
type: String,
value: ''
}
},
data: {
/** 控制 wx:ifDOM 是否存在 */
innerShow: false,
/** 控制 --visible 类,触发 CSS transition */
animVisible: false,
/** 用户列表(组件内部拉取) */
members: [] as ExistingMember[]
},
observers: {
/**
* 监听外部 show 变化:
* 打开时先拉数据再展示抽屉;关闭时移除动画类后移除 DOM
*/
show(val: boolean) {
if (val) {
this._fetchMembers()
this.setData({ innerShow: true })
setTimeout(() => {
this.setData({ animVisible: true })
}, 20)
} else {
this.setData({ animVisible: false })
setTimeout(() => {
this.setData({ innerShow: false })
}, 300)
}
}
},
methods: {
/** 调接口获取可选用户列表,根据 source 调不同接口 */
_fetchMembers() {
const userInfo = wx.getStorageSync('userInfo') as { userId?: string } | null
const userId = userInfo?.userId ?? ''
wx.showLoading({ title: '加载中...', mask: true })
if (this.properties.source === 'history') {
const params: Record<string, string> = { userId }
if (this.properties.excludeUserId) {
params.userIdExclude = this.properties.excludeUserId
}
get<HistoryApiItem[]>('weighingScale/v3/select/history/user', params, { loading: false })
.then((res: any) => {
const members: ExistingMember[] = (res.result ?? []).map((item: HistoryApiItem) => ({
id: item.id,
name: item.realname,
gender: item.sex === 1 ? '男' : '女',
age: calcAge(item.birthday),
height: item.height,
weight: 0,
idCard: '',
avatar: item.avatar ?? '',
userId: item.userId,
sex: item.sex,
birthday: item.birthday,
relationType: item.relationType,
dataType: item.dataType,
}))
this.setData({ members })
})
.catch((err: any) => {
console.error('[selectMemberDrawer] 加载成员失败:', err)
wx.showToast({ title: err?.msg || err?.message || '加载失败', icon: 'none' })
})
.finally(() => {
wx.hideLoading()
})
} else {
const sn = leFuService.deviceInfo?.serialNumber ?? ''
get<AddMemberApiItem[]>('weighingScale/v5/select/addMembers/user', { userId, sn }, { loading: false })
.then((res: any) => {
const members: ExistingMember[] = (res.result ?? []).map((item: AddMemberApiItem) => ({
id: item.id,
name: item.realname,
gender: item.sex_dictText,
age: calcAge(item.birthday),
height: item.height,
weight: item.weight,
idCard: item.idCard ?? '',
avatar: item.avatar ?? '',
relationType: item.relationType,
dataType: item.dataType,
}))
this.setData({ members })
})
.catch((err: any) => {
console.error('[selectMemberDrawer] 加载成员失败:', err)
wx.showToast({ title: err?.msg || err?.message || '加载失败', icon: 'none' })
})
.finally(() => {
wx.hideLoading()
})
}
},
/** 点击遮罩关闭 */
onTapMask() {
this.triggerEvent('close')
},
/** 点击关闭按钮 */
onTapClose() {
this.triggerEvent('close')
},
/** 点击用户行,触发 select 事件 */
onTapMember(e: WechatMiniprogram.TouchEvent) {
const member = e.currentTarget.dataset.member as ExistingMember
this.triggerEvent('select', member)
}
}
})
@@ -0,0 +1,61 @@
<!-- 选择已有用户抽屉 -->
<block wx:if="{{ innerShow }}">
<!-- 遮罩 -->
<view class="drawer-mask {{ animVisible ? 'drawer-mask--visible' : '' }}" bind:tap="onTapMask"></view>
<!-- 抽屉面板 -->
<view class="drawer-panel {{ animVisible ? 'drawer-panel--visible' : '' }}">
<!-- 顶部拖拽把手 -->
<view class="drawer-handle"></view>
<!-- 标题栏 -->
<view class="drawer-header">
<view class="drawer-icon"></view>
<view class="drawer-title">选择本人添加的用户</view>
<view class="drawer-close" bind:tap="onTapClose">
<view class="drawer-close-icon"></view>
</view>
</view>
<!-- 用户列表 -->
<view class="drawer-user-list">
<block wx:if="{{ members.length }}">
<scroll-view class="~scrollView" scroll-y>
<view class="scrollViewContent">
<block wx:for="{{ members }}" wx:key="id">
<view class="member-item" bind:tap="onTapMember" data-member="{{ item }}">
<!-- 头像 -->
<view class="member-avatar-placeholder">
<image src="{{ item.gender === '女' ? '/images/woman.png' : '/images/man.png' }}" mode="aspectFit" />
</view>
<!-- 姓名 + 性别·年龄 -->
<view class="member-info">
<view class="member-name">{{ item.name }}</view>
<view class="member-sub">{{ item.gender }}·{{ item.age }}岁 丨 {{ item.height }}cm</view>
</view>
<view class="member-type">
<block wx:if="{{ item.relationType == 1 }}">
<view class="member-type-tag member-type-tag--self">本人</view>
</block>
<block wx:elif="{{ item.dataType === 0 }}">
<view class="member-type-tag member-type-tag--employee">员工</view>
</block>
<block wx:elif="{{ item.dataType === 1 }}">
<view class="member-type-tag member-type-tag--family">家庭用户</view>
</block>
</view>
</view>
</block>
</view>
</scroll-view>
</block>
<!-- 无用户:占位 -->
<block wx:else>
<empty-data text="暂无用户" />
</block>
</view>
</view>
</block>
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,139 @@
.confirm-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
.modal-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
opacity: 0;
transition: opacity 0.3s ease;
&.anim-visible {
opacity: 1;
}
}
.modal-content {
position: relative;
width: 660rpx;
background-color: #ffffff;
border-radius: 24rpx;
overflow: hidden;
transform: scale(0.9);
opacity: 0;
transition: all 0.3s ease;
&.anim-visible {
transform: scale(1);
opacity: 1;
}
}
.modal-header {
padding-top: 50rpx;
width: 100%;
margin-bottom: 30rpx;
.modal-title {
width: 100%;
height: 36rpx;
font-weight: bolder;
font-size: 36rpx;
color: #252535;
line-height: 36rpx;
text-align: center;
margin-bottom: 24rpx;
}
.modal-sub-title {
width: 100%;
height: 32rpx;
font-weight: 400;
font-size: 32rpx;
color: #1385FA;
line-height: 32rpx;
text-align: center;
}
}
.modal-body {
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
margin-bottom: 30rpx;
.modal-body-box {
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
border-radius: 16rpx;
background-color: #F6F6F6;
.info-row {
width: 100%;
height: 80rpx;
display: flex;
padding: 10rpx 0;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-bottom: 1px solid #EAECF1;
.info-label {
color: #77849E;
height: 80rpx;
font-size: 28rpx;
line-height: 80rpx;
}
.info-value {
color: #252535;
height: 80rpx;
font-weight: 500;
font-size: 28rpx;
line-height: 80rpx;
}
&:last-of-type {
border-bottom: none;
}
}
}
}
.modal-footer {
width: 100%;
height: 110rpx;
display: flex;
border-top: 1rpx solid #EAECF1;
.modal-btn {
flex: 1;
height: 110rpx;
line-height: 110rpx;
font-size: 36rpx;
text-align: center;
}
.modal-btn-cancel {
color: #77849E;
border-right: 1rpx solid #EAECF1;
}
.modal-btn-confirm {
color: #1385FA;
font-weight: 500;
}
}
@@ -0,0 +1,63 @@
/**
* 用户信息确认弹框组件
* Properties: show(控制显示), userInfo(用户信息)
* Events: confirm(确认), cancel(取消)
*/
Component({
properties: {
/** 是否显示弹框 */
show: {
type: Boolean,
value: false
},
/** 用户信息数据 */
userInfo: {
type: Object,
value: {}
}
},
data: {
/** 控制 wx:ifDOM 是否存在 */
innerShow: false,
/** 控制 --visible 类,触发 CSS transition */
animVisible: false
},
observers: {
/**
* 监听外部 show 变化:
* 打开时先展示弹框再执行动画;关闭时移除动画类后移除 DOM
*/
show(val: boolean) {
if (val) {
this.setData({ innerShow: true })
setTimeout(() => {
this.setData({ animVisible: true })
}, 20)
} else {
this.setData({ animVisible: false })
setTimeout(() => {
this.setData({ innerShow: false })
}, 300)
}
}
},
methods: {
/** 点击遮罩关闭 */
onTapMask() {
this.triggerEvent('cancel')
},
/** 点击取消按钮 */
onTapCancel() {
this.triggerEvent('cancel')
},
/** 点击确认按钮 */
onTapConfirm() {
this.triggerEvent('confirm')
}
}
})
@@ -0,0 +1,42 @@
<view class="confirm-modal" wx:if="{{ innerShow }}">
<view class="modal-mask {{ animVisible ? 'anim-visible' : '' }}" bind:tap="onTapMask"></view>
<view class="modal-content {{ animVisible ? 'anim-visible' : '' }}">
<view class="modal-header">
<view class="modal-title">当前身份证号已存在</view>
<view class="modal-sub-title">是否直接复用信息?</view>
</view>
<block wx:if="{{ userInfo }}">
<view class="modal-body">
<view class="modal-body-box">
<view class="info-row">
<view class="info-label">姓名:</view>
<view class="info-value">{{ userInfo.realname }}</view>
</view>
<view class="info-row">
<view class="info-label">身份证号:</view>
<view class="info-value">{{ userInfo.idCard }}</view>
</view>
<view class="info-row">
<view class="info-label">性别:</view>
<view class="info-value">{{ userInfo.sex_dictText }}</view>
</view>
<view class="info-row">
<view class="info-label">身高:</view>
<view class="info-value">{{ userInfo.height }}cm</view>
</view>
<view class="info-row">
<view class="info-label">体重:</view>
<view class="info-value">{{ userInfo.weight }}kg</view>
</view>
</view>
</view>
</block>
<view class="modal-footer">
<view class="modal-btn modal-btn-cancel" bind:tap="onTapCancel">取消</view>
<view class="modal-btn modal-btn-confirm" bind:tap="onTapConfirm">确认</view>
</view>
</view>
</view>
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,58 @@
.userManagementAddUser-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(37, 37, 53, 0.5);
z-index: 100;
}
.userManagementAddUser-panel {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 660rpx;
box-sizing: border-box;
padding: 48rpx 40rpx 56rpx;
background-color: #FFFFFF;
border-radius: 24rpx;
z-index: 101;
display: flex;
flex-direction: column;
align-items: center;
.userManagementAddUser-title {
color: #252535;
height: 36rpx;
font-size: 36rpx;
font-weight: bolder;
line-height: 36rpx;
margin-bottom: 48rpx;
}
.userManagementAddUser-btn {
width: 100%;
height: 96rpx;
font-size: 36rpx;
font-weight: bold;
text-align: center;
border-radius: 48rpx;
box-sizing: border-box;
&--primary {
color: #FFFFFF;
line-height: 96rpx;
background-color: #1385FA;
margin-bottom: 40rpx;
}
&--outline {
color: #1385FA;
line-height: 92rpx;
border: 2rpx solid #1385FA;
background-color: #FFFFFF;
}
}
}
@@ -0,0 +1,26 @@
Component({
properties: {
/** 是否显示弹框 */
show: {
type: Boolean,
value: false
}
},
methods: {
/** 点击遮罩关闭 */
onClose() {
this.triggerEvent('close')
},
/** 一键添加本人 */
onAddSelf() {
this.triggerEvent('addself')
},
/** 添加其他用户 */
onAddOther() {
this.triggerEvent('addother')
}
}
})
@@ -0,0 +1,8 @@
<block wx:if="{{ show }}">
<view class="userManagementAddUser-mask" bind:tap="onClose"></view>
<view class="userManagementAddUser-panel">
<view class="userManagementAddUser-title">添加用户</view>
<view class="userManagementAddUser-btn userManagementAddUser-btn--primary" bind:tap="onAddSelf">一键添加本人</view>
<view class="userManagementAddUser-btn userManagementAddUser-btn--outline" bind:tap="onAddOther">添加其他用户</view>
</view>
</block>
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1,97 @@
.sync-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(37, 37, 53, 0.6);
z-index: 100;
}
.sync-panel {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 560rpx;
box-sizing: border-box;
background-color: #FFFFFF;
border-radius: 24rpx;
z-index: 101;
display: flex;
flex-direction: column;
align-items: center;
padding: 64rpx 48rpx;
.sync-spinner {
width: 96rpx;
height: 96rpx;
border: 8rpx solid rgba(19, 133, 250, 0.1);
border-top-color: #1385FA;
border-radius: 50%;
animation: sync-spin 1s linear infinite;
}
.sync-tick {
width: 96rpx;
height: 96rpx;
border: 8rpx solid #1385FA;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #1385FA;
font-size: 56rpx;
font-weight: bolder;
line-height: 56rpx;
}
.sync-title {
color: #252535;
height: 32rpx;
font-size: 32rpx;
line-height: 32rpx;
margin-top: 40rpx;
}
.sync-status {
color: #808080;
height: 24rpx;
font-size: 24rpx;
line-height: 24rpx;
margin-top: 24rpx;
}
.sync-percent {
color: #77849E;
height: 24rpx;
font-size: 24rpx;
line-height: 24rpx;
margin-top: 48rpx;
}
.sync-progress {
width: 464rpx;
height: 10rpx;
border-radius: 6rpx;
background-color: #D9D9D9;
margin-top: 16rpx;
overflow: hidden;
.sync-progress-inner {
height: 10rpx;
border-radius: 6rpx;
background-color: #1385FA;
}
}
}
@keyframes sync-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@@ -0,0 +1,19 @@
Component({
properties: {
/** 是否显示弹框 */
show: {
type: Boolean,
value: false
},
/** 同步进度百分比 */
percent: {
type: Number,
value: 0
},
/** 同步状态文案 */
status: {
type: String,
value: ''
}
}
})
@@ -0,0 +1,17 @@
<block wx:if="{{ show }}">
<view class="sync-mask"></view>
<view class="sync-panel">
<block wx:if="{{ percent === 100 }}">
<view class="sync-tick">✓</view>
</block>
<block wx:else>
<view class="sync-spinner"></view>
</block>
<view class="sync-title">同步成员至设备</view>
<view class="sync-status">{{ status }}</view>
<view class="sync-percent">{{ percent }}%</view>
<view class="sync-progress">
<view class="sync-progress-inner" style="width: {{ percent }}%;"></view>
</view>
</view>
</block>
Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

+25
View File
@@ -0,0 +1,25 @@
import type { LeFuConfig } from './types'
import { ENV, type EnvType } from '../utils/env/index'
/** 各环境配网网关地址:develop / trial 走测试网关,release 走正式网关 */
const DOMAINS: Record<EnvType, { domain1: string; domain2: string }> = {
develop: {
domain1: 'http://10.10.10.10:8889',
domain2: 'http://10.10.10.10:8889/weight',
},
trial: {
domain1: 'http://device.shuziweidao.com:80/gateway',
domain2: 'http://device.shuziweidao.com:80/weight',
},
release: {
domain1: 'http://device.shuziweidao.com:80/gateway',
domain2: 'http://device.shuziweidao.com:80/weight',
},
}
/** 乐福 SDK 配置 */
export const LEFU_CONFIG: LeFuConfig = {
key: 'lefudc91611833e18d94',
secret: 'eQ50JYimMp0X7uhNLj6D3lTEk4TUUvEG7dvaqKM9t1U=',
...DOMAINS[ENV],
}
+45
View File
@@ -0,0 +1,45 @@
import type { DeviceSetting } from './types'
/** 支持的设备型号配置列表(5款) */
export const DEVICE_SETTINGS: DeviceSetting[] = [
{
advLength: 999, calorieStatus: 0, createBy: null,
deviceAccuracyType: 2, deviceCalcuteType: 3, deviceConnectType: 2,
deviceFuncType: 223, deviceName: 'CF568_G', devicePowerType: 3,
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,11',
id: 65, imgUrl: null, macAddressStart: 6, remark: null,
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
},
{
advLength: 999, calorieStatus: 0, createBy: null,
deviceAccuracyType: 2, deviceCalcuteType: 3, deviceConnectType: 2,
deviceFuncType: 223, deviceName: 'YX-B4-568-BW', devicePowerType: 3,
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,11',
id: 65, imgUrl: null, macAddressStart: 6, remark: null,
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
},
{
advLength: 999, calorieStatus: 0, createBy: null,
deviceAccuracyType: 2, deviceCalcuteType: 4, deviceConnectType: 2,
deviceFuncType: 65759, deviceName: 'CF636_G', devicePowerType: 3,
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,2',
id: 216, imgUrl: null, macAddressStart: 6, remark: null,
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
},
{
advLength: 999, calorieStatus: 0, createBy: null,
deviceAccuracyType: 2, deviceCalcuteType: 4, deviceConnectType: 2,
deviceFuncType: 65759, deviceName: 'YX-B8-636-BW', devicePowerType: 3,
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,2',
id: 216, imgUrl: null, macAddressStart: 6, remark: null,
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
},
{
advLength: 999, calorieStatus: 0, createBy: null,
deviceAccuracyType: 2, deviceCalcuteType: 4, deviceConnectType: 2,
deviceFuncType: 223, deviceName: 'CF577', devicePowerType: 3,
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,11',
id: 51, imgUrl: null, macAddressStart: 6, remark: null,
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
},
]
+11
View File
@@ -0,0 +1,11 @@
export { leFuService } from './service'
export type {
ScannedDevice,
LeFuWifiItem,
ProgressData,
LockData,
LeFuConfig,
DeviceSetting,
DeviceInfo,
SyncUserData,
} from './types'

Some files were not shown because too many files have changed in this diff Show More