feat(app): 启用Expo Updates自动更新功能,优化医疗记录上传流程与API集成
This commit is contained in:
@@ -166,6 +166,8 @@ export interface MedicalRecordItem {
|
||||
date: string; // YYYY-MM-DD
|
||||
images: string[]; // Image URLs
|
||||
note?: string;
|
||||
createdAt: string; // ISO 8601
|
||||
updatedAt: string; // ISO 8601
|
||||
}
|
||||
|
||||
export interface MedicalRecordsData {
|
||||
@@ -177,30 +179,21 @@ export interface MedicalRecordsData {
|
||||
* 获取就医资料列表
|
||||
*/
|
||||
export async function getMedicalRecords(): Promise<MedicalRecordsData> {
|
||||
// Mock implementation for now
|
||||
// return api.get<MedicalRecordsData>('/api/health-profiles/medical-records');
|
||||
return {
|
||||
records: [],
|
||||
prescriptions: []
|
||||
};
|
||||
return api.get<MedicalRecordsData>('/api/health-profiles/medical-records');
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加就医资料
|
||||
*/
|
||||
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 addMedicalRecord(data: Omit<MedicalRecordItem, 'id' | 'createdAt' | 'updatedAt'>): Promise<MedicalRecordItem> {
|
||||
return api.post<MedicalRecordItem>('/api/health-profiles/medical-records', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除就医资料
|
||||
*/
|
||||
export async function deleteMedicalRecord(id: string): Promise<void> {
|
||||
// return api.delete(`/api/health-profiles/medical-records/${id}`);
|
||||
return api.delete<void>(`/api/health-profiles/medical-records/${id}`);
|
||||
}
|
||||
|
||||
// ==================== 家庭健康管理 API ====================
|
||||
|
||||
Reference in New Issue
Block a user