fix(health): 补充缺失的 medicationRecord 接口模块,修复构建报错 Cannot find module

This commit is contained in:
tianyongbao
2026-06-17 07:16:15 +08:00
parent 6895c4cd79
commit 5b077215f9

View File

@@ -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 }
})
}