feat(nutrition): 添加营养分析历史记录删除和图片预览功能
- 新增删除营养分析记录功能,支持本地状态更新和API调用 - 添加图片全屏预览功能,支持缩放和手势操作 - 实现Liquid Glass风格的删除按钮,包含兼容性处理 - 优化历史记录页面布局和交互体验 - 更新Memory Bank文档,添加Liquid Glass按钮实现指南
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user