13 次代码提交
作者 SHA1 备注 提交日期
Guoguo 6b91ebe35d feat(diagnosis): 按新协议实现多光谱诊断算法+分区差异化下发+报告面罩图
- 新协议《协议简述-添加扫描时光色》落地: FFE4 Byte17 高3位=扫描光色(1红/2红外/3紫外/4暖黄),
  低5位保留贴合状态; Byte18=0xFF 故障; auto-scan 按光色分桶采集(旧固件无标识归 red 桶降级)
- diagnosis.js 重写: PD极性(值大=吸收多,固件已确认) NR=本区/本色5区平均-1;
  每区4色argmax>0.10判定; 3路PD区几何平均+MAD剔奇异(3σ对n=3失效,审计实证);
  严重度0.05/0.15/0.30仅展示; 全参数走 diagnosis_config 热调(极性/阈值/PD映射/亮度)
- buildVendorCommand 支持 plan 多区多色单命令下发(每IO独立 红/红外/紫外/暖黄);
  builder层安全硬上限 治疗亮度≤204(80%) 时长≤600s
- 区域映射修正: 掩码=IO纵列 左0x01/中上0x02/中0x04/中下0x08/右0x10,
  修复 treatment-setup/manual/treating/getRegionName/i18n 共7处标签错位, FULL_FACE 0x7F→0x1F
- 扫描报告页: 新增分区面罩示意图(5区按推荐光着色+模式名+严重度,点击跳光疗介绍),
  推荐护理改一条命令多色下发(亮度204); 扫描中设备故障即时中止
- schema.sql diagnosis_config 种子更新(新结构); i18n 清理死键,中英对齐25/24键
2026-07-28 04:36:51 -07:00
Guoguo 7270b593ae docs: add updated protocol spec v3 and firmware-mp workflow v1 2026-06-12 08:52:09 -07:00
Guoguo b4d677a9b4 docs: add protocol docs and allow docx in docs/protocols 2026-06-11 04:16:56 -07:00
Guoguo fa44f4f5ad docs: add protocol specs, task sheet, and workflow docs to docs/protocols 2026-06-11 04:16:19 -07:00
Guoguo 3fd7578163 feat: support 17-byte ADC status from updated vendor protocol
Protocol update adds FFE4 Status format: 7×PD sensors (little-endian)
+ VBAT battery voltage (mV) + XOR checksum = 17 bytes.

- parseVendorStatus: handles 1-byte heartbeat, 17-byte ADC, 33-byte params
- handleValueChange: ADC type extracts PD array + battery % from VBAT
- Battery calculated as linear 3000mV(0%) to 4200mV(100%)
- PD data passed through status event for treatment pages
- Updated protocol doc with full byte table and old/new comparison
2026-05-19 03:54:15 -07:00
Guoguo 0feb900a1d docs: complete developer documentation (5 guides + index)
- 01-快速开始: local setup for all 3 modules, common issues
- 02-配置说明: all env vars, WeChat/Pay/DB/COS config details
- 03-架构说明: system overview, directory structure, data flows
- 04-部署指南: Tencent Cloud SCF/COS deployment, launch checklist
- 05-API接口文档: all 42 endpoints with params and response format
- README index with audience guide and quick links
2026-05-18 08:11:30 -07:00
Guoguo 583fcb7e3d feat: add user deactivation and vendor BLE protocol 2026-05-11 21:14:41 +08:00
Guoguo 5cc41f0f10 chore: update API domain deployment config 2026-05-06 21:07:44 +08:00
Guoguo b754926937 fix: clear stale token expiry on auth failure, correct doc inaccuracies
- request.js: also remove admin_token_expiry when clearing auth on
  1001/1002 response, preventing stale expiry value in storage
- 01-服务端架构.md: fix table count from 10 to 11
- 03-管理后台架构.md: add /api/v1 prefix to all API endpoint paths
2026-04-28 18:49:00 -07:00
Guoguo c5f6033ccf fix: improve UX and fix admin console display issues
Miniprogram:
- Add back buttons to all custom-nav pages
- Add debug/mock buttons (BLE connect, wear check, treatment)
  controlled by __DEV__ flag (hidden in prod)

Admin console:
- Fix log page using nonexistent fields (operator_type, target_type)
  now correctly reads admin_id/user_id/action/detail from API
- Fix subscription date fields (started_at→start_time, expired_at→expire_time)
- Wire up subscription detail/extend/renew action buttons
- Wire up device detail "查看完整日志" button
- Add "创建订阅" button to subscription toolbar
- Fix subscription status mapping (2=expired, 3=cancelled)

Docs:
- Add detailed architecture docs for server, miniprogram, admin console
2026-04-28 18:32:26 -07:00
Guoguo 88adee7743 docs: add audit report and prioritized action items
- docs/reviews/代码质量审计报告-20260428.md: full audit results and fix summary
- docs/planning/12-待办事项决策分类.md: action items split by decision owner
  (hardware team / product team / ops / independent)
2026-04-28 09:01:18 -07:00
Guoguo 543808b76e docs: align documentation with Tencent Cloud architecture 2026-04-28 23:16:26 +08:00
Guoguo 444c91c0b0 refactor: migrate to Tencent Cloud backend 2026-04-28 22:56:47 +08:00