b80e87260061c98905300b4daab7a672a7bd8ba8
Server: - Block startup with default JWT secrets in production - Make subscription verify admin-only (no payment integration yet) - Add device ownership validation on command/result, event, treatment/sync - Remove admin token from request body fallback - Add pageParams boundary protection (pageSize capped at 100) - Fix COS getObjectUrl to use callback-based Promise - Add settings key whitelist matching frontend fields - Add user existence check before subscription creation - Fix firmware always returning has_update:true - Replace hardcoded trial subscription with actual DB query - Extract shared utilities (limitClause, toMysqlDate, formatDate) Miniprogram: - Replace fake PD random data with placeholder - Mark client-timer treatment completions with source field - Disable mock.js - Fix BLE listener leaks (save refs, cleanup in onUnload) - Fix ble.off clearing all listeners (pass specific callback) - Add BLE disconnect detection via onBLEConnectionStateChange - Fix subscription status type consistency (number not string) - Fix scan callback accumulation in ble.js - Fix history stats accumulation across pages - Fix subscribe-success/treatment-done hardcoded values - Fix profile subscription view logic - Replace purchase flow with admin-contact modal - Add error logging in command-sync report Admin console: - Fix AdminLayout logout (require->import, logout->clearToken) - Remove all mock data from production request.js - Replace dashboard fake data with real API calls - Replace monthly_revenue with subscription_count - Fix subscription stats fallback (|| -> ??) - Add token expiry tracking (7 days) - Unify device status map and subscription status text - Fix user page record link navigation - Fix subscription createForm.user_id type handling - Add error feedback in all empty catch blocks - Remove unused remember checkbox and uview-plus dependency - Extract common CSS to shared stylesheet (-900 lines) - Extract formatDate to shared utils/format.js - Show real admin name in layout header
Hox 文档目录
本目录集中存放项目说明、设计文档、协议资料、计划清单和原型文件,根目录只保留代码目录与仓库级配置。
目录结构
| 目录 | 内容 |
|---|---|
requirements/ |
产品说明、系统说明等需求来源文档 |
design/ |
业务流程、接口、数据库、后台、安全、测试等设计文档 |
protocols/ |
BLE、云端通信等协议文档;部分 IoT/MQTT 内容为历史设计参考 |
planning/ |
开发计划、当前进度交接、待确认事项、缺口清单 |
reviews/ |
代码与文档对比、评审和分析材料;旧评审可能是历史快照 |
prototypes/ |
小程序和管理后台原型文件 |
reference/ |
原始资料包、UI 导出页、截图等参考材料 |
当前入口
planning/PROGRESS.md— 当前实现和部署状态,以此为准deploy/tencent-cloud.md— 腾讯云函数、MySQL、COS 部署说明requirements/软件系统说明.docxrequirements/光子美容仪软件系统说明.docxdesign/01-BLE通信协议明细.mddesign/02-小程序业务流程与状态机.mdplanning/需求缺口清单.mdreviews/代码与设计文档对比分析.md— 历史阶段评审,不能代表当前实现
当前实现提示
- 当前后端是
server/下的腾讯云 HTTP 函数,不是微信云开发函数。 - 当前小程序通过 HTTPS API 调后端,不再使用
wx.cloud.callFunction()。 - 当前设备不直接连云端 MQTT,设备通信主路径是小程序 BLE 中转。
- 登录资料授权使用
wx.getUserProfile()官方弹窗;微信可能返回微信用户等脱敏资料。
语言
JavaScript
77.2%
Vue
22%
CSS
0.7%