fix(miniprogram): 修复 API 接口字段对齐 — 33 接口端到端验证
P0: submitRecord() 路径修正 POST /follow-up-records → POST /follow-up-tasks/{id}/records
+ 请求体从 {task_id, content:{text}} 改为 {result, patient_condition, executed_date}
P1: ConsultationSession.subject/last_message 改为可选(后端暂不返回)
P1: Appointment.department 改为可选(后端未 JOIN 医生表)
P1: FollowUpRecord 结构对齐后端扁平字段(executed_date/result/medical_advice 等)
P2: Article 增加 status 可选字段
This commit is contained in:
@@ -38,9 +38,9 @@ export default function FollowUpDetail() {
|
||||
}
|
||||
setSubmitting(true);
|
||||
try {
|
||||
await submitRecord({
|
||||
task_id: id,
|
||||
content: { text: content.trim() },
|
||||
await submitRecord(id, {
|
||||
result: content.trim(),
|
||||
patient_condition: content.trim(),
|
||||
});
|
||||
Taro.showToast({ title: '提交成功', icon: 'success' });
|
||||
trackEvent('followup_submit', { task_id: id });
|
||||
|
||||
Reference in New Issue
Block a user