fix: 用药编辑字段名修正 - 黑屏修复
- times→timeOfDay, start_date→startDate, end_date→endDate - 去掉不存在的weekday字段 - 添加source=Manual - frequency固定传Daily
This commit is contained in:
@@ -87,12 +87,12 @@ class _MedicationEditPageState extends ConsumerState<MedicationEditPage> {
|
||||
await service.create({
|
||||
'name': item.name,
|
||||
'dosage': item.dosage,
|
||||
'frequency': item.frequency,
|
||||
'times': timesStr,
|
||||
'start_date': item.startDate.toIso8601String().split('T')[0],
|
||||
'frequency': 'Daily',
|
||||
'timeOfDay': timesStr,
|
||||
'startDate': item.startDate.toIso8601String().split('T')[0],
|
||||
if (item.endDate != null)
|
||||
'end_date': item.endDate!.toIso8601String().split('T')[0],
|
||||
if (item.frequency == '每周1次') 'weekday': item.weekday,
|
||||
'endDate': item.endDate!.toIso8601String().split('T')[0],
|
||||
'source': 'Manual',
|
||||
});
|
||||
}
|
||||
if (!mounted) return;
|
||||
|
||||
Reference in New Issue
Block a user