记录模块接口对接
This commit is contained in:
55
apis/interfaces/essentialInfo.js
Normal file
55
apis/interfaces/essentialInfo.js
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
/*
|
||||
* @Description:创建档案模块
|
||||
* @Author: Aimee·Zhang
|
||||
* @Date: 2022-01-12 13:27:31
|
||||
* @LastEditors: Aimee·Zhang
|
||||
* @LastEditTime: 2022-01-12 14:32:11
|
||||
*/
|
||||
|
||||
import { request } from '../index'
|
||||
/**
|
||||
* @description:新建健康档案
|
||||
* @params {age,sex,height,weight,exercise,goal_weight,days}
|
||||
* @return {*}
|
||||
* @method {post}
|
||||
* @Date: 2022-01-12 11:08:11
|
||||
*/
|
||||
const recordsHealth = (data) => {
|
||||
console.log(data, 'camsji///////////')
|
||||
return request({
|
||||
url: 'health/records',
|
||||
method: "POST",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:编辑健康档案前置
|
||||
* @params {id}档案id
|
||||
* @return {}
|
||||
* @method {get}
|
||||
* @Date: 2022-01-12 13:39:56
|
||||
*/
|
||||
const editHealthBefore = (id) => {
|
||||
return request({
|
||||
url: `health/records/${id}/edit`
|
||||
})
|
||||
}
|
||||
/**
|
||||
* @description:修改健康档案
|
||||
* @params {record_id:档案id,data:参数}
|
||||
* @return {*}
|
||||
* @Date: 2022-01-12 13:49:29
|
||||
*/
|
||||
const editHealth = (record_id, data) => {
|
||||
return request({
|
||||
url: `health/records/${record_id}`,
|
||||
method: "PUT",
|
||||
date: data
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
recordsHealth
|
||||
}
|
||||
Reference in New Issue
Block a user