feat(个人中心): 优化会员横幅组件,支持深色模式与国际化;新增医疗记录卡片组件,完善健康档案功能
This commit is contained in:
@@ -155,6 +155,54 @@ export async function getHealthHistoryProgress(): Promise<HealthHistoryProgress>
|
||||
return api.get<HealthHistoryProgress>('/api/health-profiles/history/progress');
|
||||
}
|
||||
|
||||
// ==================== 就医资料 API ====================
|
||||
|
||||
export type MedicalRecordType = 'medical_record' | 'prescription';
|
||||
|
||||
export interface MedicalRecordItem {
|
||||
id: string;
|
||||
type: MedicalRecordType;
|
||||
title: string;
|
||||
date: string; // YYYY-MM-DD
|
||||
images: string[]; // Image URLs
|
||||
note?: string;
|
||||
}
|
||||
|
||||
export interface MedicalRecordsData {
|
||||
records: MedicalRecordItem[];
|
||||
prescriptions: MedicalRecordItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取就医资料列表
|
||||
*/
|
||||
export async function getMedicalRecords(): Promise<MedicalRecordsData> {
|
||||
// Mock implementation for now
|
||||
// return api.get<MedicalRecordsData>('/api/health-profiles/medical-records');
|
||||
return {
|
||||
records: [],
|
||||
prescriptions: []
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加就医资料
|
||||
*/
|
||||
export async function addMedicalRecord(data: Omit<MedicalRecordItem, 'id'>): Promise<MedicalRecordItem> {
|
||||
// return api.post<MedicalRecordItem>('/api/health-profiles/medical-records', data);
|
||||
return {
|
||||
id: Date.now().toString(),
|
||||
...data
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除就医资料
|
||||
*/
|
||||
export async function deleteMedicalRecord(id: string): Promise<void> {
|
||||
// return api.delete(`/api/health-profiles/medical-records/${id}`);
|
||||
}
|
||||
|
||||
// ==================== 家庭健康管理 API ====================
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user