feat: 积分商城子页面 + 日常监测 + 统计报表 (Chunk 6)
Some checks failed
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

小程序 — 积分商城 (3 新页面):
- mall/exchange: 兑换确认 (余额校验/QR码生成)
- mall/orders: 我的订单 (状态筛选/分页/QR展示)
- mall/detail: 积分明细 (余额卡片/收入支出筛选/流水列表)

小程序 — 上报 Tab 改造:
- health/daily-monitoring: 日常监测表单 (血压/体重/血糖/出入量)
- health/index: 增加快捷操作/打卡状态/近期监测卡片
- consultation: 替换占位为咨询列表 (会话/状态/未读)
- profile: 新增积分余额/打卡天数/我的订单/积分明细入口

小程序 — 新增服务:
- services/consultation.ts: 咨询会话 API
- services/points.ts: 扩展兑换/订单/流水 API
- services/health.ts: 扩展日常监测 API

PC 管理端:
- StatisticsDashboard: 统计报表仪表盘 (患者/咨询/随访/积分卡片 + Top10排行 + 快速链接)
- 侧边栏新增统计报表入口 (健康模块首页)
This commit is contained in:
iven
2026-04-25 19:17:11 +08:00
parent 1507ec6036
commit 280f65658a
23 changed files with 2819 additions and 11 deletions

View File

@@ -132,6 +132,14 @@ export default function Mall() {
fetchProducts(1, key, true);
};
const handleProductClick = (item: PointsProduct) => {
if (item.stock <= 0) {
Taro.showToast({ title: '已兑完', icon: 'none' });
return;
}
Taro.navigateTo({ url: `/pages/mall/exchange/index?product_id=${item.id}` });
};
const balance = account?.balance ?? 0;
return (
@@ -194,7 +202,7 @@ export default function Mall() {
) : (
<View className='product-grid'>
{products.map((item) => (
<View className='product-card' key={item.id}>
<View className='product-card' key={item.id} onClick={() => handleProductClick(item)}>
<View
className='product-image'
style={{ backgroundColor: TYPE_COLORS[item.product_type] || '#94A3B8' }}