feat(nutrition): 添加营养分析历史记录删除和图片预览功能

- 新增删除营养分析记录功能,支持本地状态更新和API调用
- 添加图片全屏预览功能,支持缩放和手势操作
- 实现Liquid Glass风格的删除按钮,包含兼容性处理
- 优化历史记录页面布局和交互体验
- 更新Memory Bank文档,添加Liquid Glass按钮实现指南
This commit is contained in:
richarjiang
2025-10-16 16:43:45 +08:00
parent e4ddd21305
commit c6084fe702
5 changed files with 310 additions and 18 deletions

View File

@@ -229,3 +229,16 @@ export async function getNutritionAnalysisRecords(params?: GetNutritionRecordsPa
};
}
}
/**
* 删除营养成分分析记录
*/
export async function deleteNutritionAnalysisRecord(recordId: number): Promise<any> {
try {
const response = await api.delete(`/diet-records/nutrition-analysis-records/${recordId}`);
return response;
} catch (error) {
console.error('[NUTRITION_RECORDS] 删除记录失败:', error);
throw error;
}
}