init
This commit is contained in:
57
apis/interfaces/essentialInfo.js
Normal file
57
apis/interfaces/essentialInfo.js
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
/*
|
||||
* @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) => {
|
||||
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) => {
|
||||
console.log(data,'data............')
|
||||
return request({
|
||||
url: `health/records/${record_id}`,
|
||||
method: "PUT",
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
recordsHealth,
|
||||
editHealthBefore,
|
||||
editHealth
|
||||
}
|
||||
Reference in New Issue
Block a user