feat(health+miniprogram): 预约/报告/随访/资讯/家庭管理 — Chunk 4-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

后端:
- 添加 articles 表迁移 + Entity + Service + Handler
- 健康数据趋势 API (get_mini_trend) 注册路由
- article CRUD (list/get) + DTO

前端 (11个新页面 + 5个服务):
- 预约挂号: 列表/创建向导/详情页
- 报告管理: 列表/详情页
- 随访管理: 任务列表/记录详情页
- 资讯文章: 文章详情页
- 个人中心: 就诊人管理/新增/我的报告/我的随访/用药提醒/设置
- 更新 app.config.ts 注册全部路由
- 更新 profile/article 页面为真实功能
This commit is contained in:
iven
2026-04-24 00:58:40 +08:00
parent ee9a5c4da1
commit 9ef65b9a9f
53 changed files with 6044 additions and 32 deletions

View File

@@ -1,10 +1,35 @@
import React from 'react';
import { View, Text } from '@tarojs/components';
import Taro from '@tarojs/taro';
import { useAuthStore } from '../../stores/auth';
import '../health/index.scss';
import './index.scss';
const MENU_ITEMS = [
{ label: '就诊人管理', icon: '👥', path: '/pages/profile/family/index' },
{ label: '我的报告', icon: '📋', path: '/pages/profile/reports/index' },
{ label: '我的随访', icon: '💬', path: '/pages/profile/followups/index' },
{ label: '用药提醒', icon: '💊', path: '/pages/profile/medication/index' },
{ label: '设置', icon: '⚙️', path: '/pages/profile/settings/index' },
];
export default function Profile() {
const { user, logout } = useAuthStore();
const handleMenuClick = (path: string) => {
Taro.navigateTo({ url: path });
};
const handleLogout = () => {
Taro.showModal({
title: '退出登录',
content: '确定要退出登录吗?',
}).then((res) => {
if (res.confirm) {
logout();
}
});
};
return (
<View className='profile-page'>
<View className='profile-header'>
@@ -18,14 +43,12 @@ export default function Profile() {
</View>
<View className='profile-menu'>
{[
{ label: '就诊人管理', icon: '👥' },
{ label: '我的报告', icon: '📋' },
{ label: '我的随访', icon: '💬' },
{ label: '用药提醒', icon: '💊' },
{ label: '设置', icon: '⚙️' },
].map((item) => (
<View className='menu-item' key={item.label}>
{MENU_ITEMS.map((item) => (
<View
className='menu-item'
key={item.label}
onClick={() => handleMenuClick(item.path)}
>
<Text className='menu-icon'>{item.icon}</Text>
<Text className='menu-label'>{item.label}</Text>
<Text className='menu-arrow'></Text>
@@ -33,7 +56,7 @@ export default function Profile() {
))}
</View>
<View className='profile-logout' onClick={logout}>
<View className='profile-logout' onClick={handleLogout}>
<Text className='logout-text'>退</Text>
</View>
</View>