fix(health): 补充缺失的 medicationRecord 接口模块,修复构建报错 Cannot find module
This commit is contained in:
45
src/api/health/medicationRecord.js
Normal file
45
src/api/health/medicationRecord.js
Normal 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 }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user