iven
|
59dd5ef38e
|
fix(mp): P1+P2 稳定性加固 — 导航安全+生产日志+分包预加载+logout清理
P1:
- 全局 23 个页面 Taro.navigateTo → safeNavigateTo,防止页栈超10层
- 生产构建保留 console.warn/error,便于线上问题排查
- 添加 preloadRule 分包预加载(首页预加载健康/医生/文章分包)
P2:
- logout 时清理 ai_chat_history + BLE DataBuffer 缓存
- restore() 移除冗余的双重 Storage 读取(secureGet 已包含 getStorageSync)
- 首页文章图片添加 lazyLoad
|
2026-05-17 17:13:35 +08:00 |
|
iven
|
95e219ad5a
|
refactor(mp): CSS 变量主题 + 登录页改造 — UI 优化 Phase 0-2
Phase 0: 建立 design token 体系
- tokens.scss 新增 --tk-pri/--tk-pri-l/--tk-pri-d/--tk-shadow-btn/--tk-shadow-tab
- .doctor-mode 覆盖为靛蓝色系,.elder-mode 非线性放大字号
- variables.scss 新增医生端色彩 + 阴影变量
Phase 1: 组件库 + 页面全局替换
- 75 个页面 SCSS $pri → var(--tk-pri) 全量替换
- 11 个新 UI 组件(PrimaryButton/TabFilter/FormInput/ProgressRing 等)
- 8 个现有组件 SCSS 更新
- 18 个医生端页面 useElderClass → useDoctorClass
- PageHeader 匹配原型 NavBar 规格
Phase 2: 登录页重写
- Logo: 方形+ → 圆形渐变 H
- 登录方式: 纯微信 → 账号密码 + 微信一键登录
- 新增 credentialLogin API + store action
- 字号/间距严格匹配原型 mp-01-login.html
|
2026-05-16 21:29:13 +08:00 |
|
iven
|
37327a4da4
|
refactor(mp): 迁移医护+健康页面 — 使用 PageShell + ContentCard 统一组件库
行动收件箱、医护工作台、健康趋势、患者告警、体征录入、
日常监测、设备同步共 7 个页面迁移:
- 最外层容器 → PageShell
- 卡片元素 → ContentCard
- SCSS 删除 min-height/background/box-shadow 通用样式
|
2026-05-16 01:33:24 +08:00 |
|
iven
|
3fb5a77ac0
|
refactor(mp): 统一空状态为 EmptyState 组件 + 清理旧 Tab CSS
- 4 个页面的内联空状态替换为共享 EmptyState 组件
(messages / action-inbox / pkg-health/alerts / mall)
- 清理 10 个页面的旧 Tab CSS(迁移到 SegmentTabs 后不再需要)
- 清理 elder-mode 中已删除的 mall-empty-state 引用
|
2026-05-15 23:11:34 +08:00 |
|
iven
|
c06e986090
|
fix(mp): 小程序页面优化 + E2E 测试报告更新
- 小程序各页面优化和修复
- 更新联调报告和 E2E 测试报告
- 更新 miniprogram wiki
|
2026-05-15 23:03:21 +08:00 |
|
iven
|
dc983945ff
|
fix(mp): 五专家组审查 HIGH 级问题修复 — 9 项
- S-1: 隐私政策描述修正("混淆加密" → "HTTPS + 微信沙箱")
- A-1: getCachedPatientId 统一导出 + 9 处 Storage 直读替换
- A-2: usePageData loading 改为 useState 响应式
- A-3: health.ts refreshingToday 移入 store state
- M-2: prod config 移除 console.error/warn
- M-4: clearCache 后同步刷新 request.ts 内存缓存
- Q-3: doctor/appointment.ts any[] → Appointment 类型
- Q-4: daily-monitoring 常量提取到 constants.ts
- 清理: 删除空目录 FamilyPicker/HealthCard + 未使用组件 DeviceCard
|
2026-05-15 09:17:36 +08:00 |
|
iven
|
4c38fcd89d
|
refactor(mp): 分包策略优化 — 合并单页分包 + doctor 拆包 + consultation 移出主包
- 合并 4 个单页分包:report→pkg-profile/reports, followup→pkg-profile/followups,
events→pkg-profile/events, device-sync→pkg-health
- consultation/detail 移出主包到 pkg-consultation 分包(减少主包体积)
- doctor 18 页拆分为 pkg-doctor-core(8页) + pkg-doctor-clinical(10页)
- 全部导航路径和 import 路径同步更新
- 分包 10→8 个,主包页面 13→12
|
2026-05-15 07:53:00 +08:00 |
|
iven
|
1fd2c7a533
|
refactor(mp): 架构重构 — usePageData 统一数据加载 + Store 解耦 + 大页面拆分
新增 usePageData hook(useDidShow 节流 + usePullDownRefresh + loadingRef 防重入 + enabled 条件守卫),
44/58 页面迁移接入,消灭 4 种数据加载模式并存。
- 新增 hooks/usePageData.ts — 统一页面数据加载生命周期
- 新增 stores/index.ts — resetAllStores() 解耦 auth↔health store 依赖
- 新增 pages/index/useHomeData.ts — 首页数据 hook(424→282 行)
- 新增 pages/health/useHealthData.ts — 健康页数据 hook(422→254 行)
- 44 个页面迁移到 usePageData(9 患者端 + 15 医生端 + 20 子包)
- auth store logout 不再直接导入 health store
构建通过,测试 74/75(1 个预存失败)。
|
2026-05-15 01:13:01 +08:00 |
|
iven
|
fed1759985
|
fix(mp): setTimeout 无清理修复 — useSafeTimeout hook + 10 页面接入
新增 useSafeTimeout hook,页面隐藏时自动清理所有定时器。
10 个页面接入:daily-monitoring、exchange、family-add、
health/input、prescription detail/create、dialysis detail/create、
appointment detail/create。所有 fire-and-forget setTimeout 替换为
safeSetTimeout,避免页面切走后定时器回调在错误上下文执行。
|
2026-05-15 00:38:23 +08:00 |
|
iven
|
8f353946e1
|
fix(mp): T40 UI 审计修复 — 28 项设计系统合规 + 安全加固 + 讨论记录
T40 UI 审计修复(60 页面全覆盖):
- 新增 $acc-d/$wrn-d 渐变中间色变量,修复首页轮播渐变硬编码
- 替换 8 处裸 white 为 $white 设计变量(5 个 SCSS 文件)
- 修复 7 处触摸目标 40/44px → 48px(健康/消息/咨询/预约/首页)
- 3 页面新增 Loading 状态(体征录入/个人中心/就诊人添加)
- statusTag 移除硬编码布局值,改用 SCSS mixin 控制
- 医生端 14 页面架构 Hook 层补充(useThrottledDidShow 替换 useEffect)
- 移除 action-inbox 未使用 import
安全 P0 修复:
- JWT 中间件加固:token 类型校验 + 过期预检 + 类型别名简化
- 速率限制增强:滑动窗口 + 暴力破解防护
- analytics handler 错误处理完善
文档:
- T40 审计报告(24 PASS / 36 PASS_WITH_ISSUES / 0 NEEDS_WORK)
- 5 份 DevTools/性能审计讨论记录
- wiki 症状导航 + 小程序章节更新
|
2026-05-14 23:12:54 +08:00 |
|
iven
|
9faccac9eb
|
perf(mp): 移除 Zod 依赖,轻量验证替代 — 包体积 -300KB
- 新增 utils/validate.ts 轻量验证工具(<1KB vs Zod 360KB)
- daily-monitoring: Zod schema → validateNum() 直接验证
- input: Zod schema → num()/validateStr() 直接验证
- config/index.ts: 移除 Zod include 编译配置
效果:总体积 1.8MB→1.5MB(-17%),pkg-health 分包 432KB→84KB(-81%)
|
2026-05-13 23:56:12 +08:00 |
|
iven
|
93c77c5857
|
fix(mp): T40 UI 设计系统合规审计修复 — 60 页面全覆盖
- 新增 $white 语义变量 + --tk-font-display Token
- 44 处 #fff → $white,2 处 background: #fff → $card
- 14 处 border-radius 硬编码统一为 $r-xs/$r-lg/$r
- 3 处 TSX inline 颜色提取为 SCSS 类(exchange/orders/action-inbox)
- ErrorBoundary 重构:6 个 inline style → SCSS 类 + Design Token
- 2 处离调色板颜色修正(#0284C7→$tx2, #94A3B8→$tx3)
- 2 处静默 catch 块添加状态清理(article/health)
- 趋势页补 Loading/EmptyState;咨询页 GuestGuard 统一
- 4 处 #FFFFFF → $white(mixins/index/exchange/variables)
|
2026-05-13 23:26:00 +08:00 |
|
iven
|
890c132890
|
refactor(miniprogram): 全面接入 Design Token — 68 SCSS 文件 px→var(--tk-*)
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
- 重写 tokens.scss:校准 10 级字号 + 4 结构 token 匹配实际设计值
- 更新 mixins.scss:4 个 mixin 引用 token 替代硬编码
- 68 SCSS 文件全面迁移:font-size px → var(--tk-font-*),辅助文字色 → var(--tk-text-secondary)
- 清理 12 个页面的本地 mixin 重复定义
- elder-mode.scss 从 530 行缩减至 ~120 行:删除所有字号/颜色覆写,仅保留结构布局
- Token 覆盖率:634 引用 / 仅 3 个特殊硬编码值(72px/80px/21px)
关怀模式通过 CSS 变量级联自动生效,消除"打地鼠"问题。
|
2026-05-09 23:53:07 +08:00 |
|
iven
|
e8ccee02d5
|
feat(miniprogram): 关怀模式 Phase 2 — Design Token + 15 页面批量接入
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新建 useElderClass hook,替代每页 3 行样板代码
- 新建 CSS 自定义属性 Design Token 系统(tokens.scss)
正常/关怀两套值:字号、间距、触控、布局参数
- 15 个页面批量接入关怀模式 class:
TabBar: 商城页
主流程: 预约列表/详情/创建、咨询详情
子包: 体征录入/趋势/日常监测/告警、用药/档案/随访/报告/家庭/设置
- 新建 elder-toast 工具(关怀模式 3s + 触觉反馈)
- 页面覆盖率:4/59 → 22/59 (37%)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-09 22:17:58 +08:00 |
|
iven
|
28dafa9bea
|
fix: 多角色业务链路测试发现并修复 3 类问题
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
1. 角色权限修复(CRITICAL):
- operator 角色权限为空(迁移 name/code 不匹配 + 软删除冲突)
- doctor 角色权限被误清(API assign_permissions 失败导致全部软删除)
- nurse 缺 devices 权限 + doctor/nurse 缺 appointment 权限
- 新增 3 个迁移 000130-000132 修复所有角色权限
2. 趋势指标映射修复(HIGH):
- 前端 blood_pressure_systolic → systolic_bp_morning
- 前端 blood_sugar_fasting → blood_sugar
- 同步修复首页、健康页、趋势页的 indicator 参数
3. 咨询页错误处理优化(MEDIUM):
- 403/401 时显示空列表而非"加载失败"错误提示
|
2026-05-08 22:00:43 +08:00 |
|
iven
|
3dac6a9eda
|
fix(miniprogram): 多角色找茬模式发现并修复 16 个问题
CI / frontend-build (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / security-audit (push) Has been cancelled
P0 Bug:
- 健康 AI 建议幽灵路径 pkg-appointment → appointment/create
- 血糖 indicator_type 始终 blood_sugar,不区分空腹/餐后
- 商城订单页 switchTab 跳转非 TabBar 页面
P1 设计系统:
- Profile/Index 页 emoji 图标替换为衬线首字
- Profile 硬编码颜色替换为 SCSS 变量 class
- alerts/action-inbox 两个页面全面接入设计系统
- ai-report/detail 删除重复 mixin 定义
- ErrorBoundary 添加重试按钮移除 emoji
- 新增 $r-xs: 8px 圆角变量
P1 导航/交互:
- Profile 补充 4 个缺失菜单(透析/知情同意/用药/活动)
- Settings 隐私政策改为跳转实际页面
- 全局启用 enablePullDownRefresh
- 首页/健康页添加下拉刷新
- 咨询/消息列表添加分页加载更多
- 医生端患者列表改为上拉加载
- 首页/健康页间距统一为 24px
|
2026-05-08 16:07:06 +08:00 |
|
iven
|
4a95a83d6b
|
fix(miniprogram): 统一状态色映射,对齐设计系统色板
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
- 创建 utils/statusTag.ts 共享状态色工具(对齐 variables.scss)
- doctor/consultation: 使用共享状态色替代 Tailwind 硬编码
- doctor/followup: 使用共享状态色替代 Tailwind 硬编码
- doctor/action-inbox: SCSS 状态点替换为设计系统变量
- doctor/index: SCSS 告警/搜索区替换为设计系统变量
- pkg-health/alerts: SCSS 严重度标签替换为设计系统变量
|
2026-05-06 10:59:13 +08:00 |
|
iven
|
bef2ea7169
|
feat(miniprogram): 适老化修复 — Phase 2e
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
M6: 创建 utils/date.ts 统一日期工具函数(formatDate/formatDateTime/toRelativeDate 等)
M8: 28 个 SCSS 文件 font-size 20px → 22px 全量适老化
M7: request.ts 增加 403 权限不足/5xx 服务器错误/网络超时异常统一拦截
|
2026-05-05 00:22:49 +08:00 |
|
iven
|
603af83aa9
|
fix: P0 止血 — 消除崩溃风险 + 伪CAS修复 + 硬编码清除 + 晚间血压
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 sea_orm_ext 模块: safe_version() / bump_version() 替代 14 处 unwrap()
- 修复 points_service 伪 CAS 逻辑 bug: 在 Set() 前提取原始版本并重新验证
- AdminDashboard: API 失败时显示 unknown 状态而非虚假绿色 healthy
- AdminDashboard: 今日操作改用真实数据,移除 "0 错误" 硬编码
- OperatorWorkbench: 移除硬编码 "美玲",改用真实用户名
- Home.tsx: operator "内容发布" 从硬编码 0 改为真实积分统计
- 小程序体征录入: 新增晚间血压 indicator_type,映射到 evening 字段
|
2026-05-02 23:42:01 +08:00 |
|
iven
|
2cc0f5af25
|
refactor(miniprogram): 体征阈值改用动态 API — 替代硬编码参考范围
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- health.ts 新增 getHealthThresholds/findThreshold/DEFAULT_THRESHOLDS
- 24h storage 缓存 + 降级到内置默认值
- health/index.tsx: REF_RANGES → buildRefRange(thresholds)
- pkg-health/input: WARN_THRESHOLDS → getWarnForIndicator(thresholds)
|
2026-05-02 11:40:54 +08:00 |
|
iven
|
43769dae5a
|
feat(mp): 患者端健康告警页面 + 首页入口
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
P1-8: 小程序患者告警推送
- 新增 alert service:listPatientAlerts 按患者 ID 查询告警
- 新增 pkg-health/alerts 告警列表页:严重程度标签 + 状态过滤 + 分页
- 首页快捷服务新增"健康告警"入口
- app.config.ts 注册 alerts/index 页面路由
|
2026-04-30 07:23:05 +08:00 |
|
iven
|
cb6f5cc651
|
feat(mp+health): 小程序分包迁移 + 积分商城后台列表 API
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 小程序页面迁移到 pkg-health/pkg-mall/pkg-profile 分包目录
- 删除旧 pages/health/input、pages/mall/detail 等旧路径
- 导航路径更新为分包路径(/pages/pkg-mall/exchange/index 等)
- TrendChart 组件优化
- 后台添加 admin_list_products API(支持查看已下架商品)
- config/index.ts 添加 defineConstants 环境变量
- mp e2e check-readiness 路径修正
|
2026-04-29 07:29:49 +08:00 |
|
iven
|
202c6dd0d2
|
feat(miniprogram): 小程序设备数据集成打通 — Phase 3
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 首页设备入口简化为直接跳转按钮(去除硬编码 never 状态)
- 体征录入页增加「从设备同步」入口,设备数据自动回填表单
- 设备同步页支持 returnTo 参数,完成后返回录入页
- 医护工作台增加告警中心固定导航入口(带数字角标)
|
2026-04-29 06:36:12 +08:00 |
|