文档
测试
彭国强

获取常见食物

POST
http://localhost/userSelfManagemnet/getCommonFood

请求头

参数名
类型
描述
必填

请求参数

参数名
类型
描述
必填
phone
int
示例:18797854742
必填
token
string
示例:bcc80d8401047a7756c7efd8748d9d64
必填
page
int
示例:3
必填
pageSize
int
示例:20
必填

响应参数

参数名
类型
描述
必填
msg
string
示例:获取成功
必填
foods
array
数据列表
必填
foodType
int
示例:1
必填
name
string
示例:胡萝卜(红)[金笋,丁香萝卜]
必填
weight
int
示例:96
必填
id
int
示例:229
必填
foodPic
string
示例:https://tj-data-test.oss-cn-hangzhou.aliyuncs.com/uploadFiles/images/resource/40b69e78-8997-49f5-8fc9-39886302aabf.png
必填
energyUnit
string
示例:千卡
必填
energy
int
示例:39
必填
weightUnit
string
示例:克
必填
state
int
示例:1
必填

响应格式

{ "msg": "获取成功", "foods": [ { "foodType": 1, "name": "小麦", "weight": 100, "id": 1, "foodPic": "", "energyUnit": "千卡", "energy": 339, "weightUnit": "克" }, { "foodType": 1, "name": "猪肉(肥瘦)(X)", "weight": 100, "id": 675, "foodPic": "", "energyUnit": "千卡", "energy": 395, "weightUnit": "克" }, { "foodType": 1, "name": "猪肉(肥)", "weight": 100, "id": 676, "foodPic": "", "energyUnit": "千卡", "energy": 807, "weightUnit": "克" }, { "foodType": 1, "name": "豇豆", "weight": 100, "id": 172, "foodPic": "", "energyUnit": "千卡", "energy": 336, "weightUnit": "克" }, { "foodType": 1, "name": "苹果(平均)", "weight": 76, "id": 469, "foodPic": "", "energyUnit": "千卡", "energy": 54, "weightUnit": "克" } ], "state": 1 }