From 5b077215f99cca331ed8b7fd193c432172e2b1dc Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Wed, 17 Jun 2026 07:16:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(health):=20=E8=A1=A5=E5=85=85=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=20medicationRecord=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20Cannot=20find=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/health/medicationRecord.js | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/api/health/medicationRecord.js diff --git a/src/api/health/medicationRecord.js b/src/api/health/medicationRecord.js new file mode 100644 index 0000000..36af2f2 --- /dev/null +++ b/src/api/health/medicationRecord.js @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +// 查询服药记录列表 +export function listMedicationRecord(query) { + return request({ + url: '/health/medicationRecord/list', + method: 'get', + params: query + }) +} + +// 查询今日待服药记录 +export function getTodayRecords() { + return request({ + url: '/health/medicationRecord/today', + method: 'get' + }) +} + +// 根据计划ID和日期查询服药记录 +export function getRecordsByPlanAndDate(planId, recordDate) { + return request({ + url: '/health/medicationRecord/byPlanDate', + method: 'get', + params: { planId, recordDate } + }) +} + +// 确认服药 +export function takeMedication(id, dosage, actualTime) { + return request({ + url: '/health/medicationRecord/take/' + id, + method: 'put', + params: { dosage, actualTime } + }) +} + +// 跳过服药 +export function skipMedication(id, reason) { + return request({ + url: '/health/medicationRecord/skip/' + id, + method: 'put', + params: { reason } + }) +}