文档
测试
彭国强

搜索食材

POST
http://localhost/userSelfManagemnet/selectFood

接口描述

搜索套餐

请求头

参数名
类型
描述
必填

请求参数

参数名
类型
描述
必填
phone
int
示例:18797854742
必填
token
string
示例:bcc80d8401047a7756c7efd8748d9d64
必填
keyword
string
示例:食物关键字,如牛肉,
必填
current
int
示例:1
必填
size
int
示例:10
必填

响应参数

参数名
类型
描述
必填
msg
string
示例:搜索成功
必填
total
int
示例:23
必填
pages
int
示例:3
必填
searchFoods
array
数据列表
必填
carbohydrate
int
示例:36
必填
elements
string
示例:鱿鱼(水浸)#100,基围虾#100,辣椒(青、尖)#100,米饭(蒸)(平均)#100,花生油#10
必填
energy
int
示例:400
必填
fat
int
示例:38
必填
id
int
示例:18
必填
protein
int
示例:39
必填
setName
string
示例:鱿鱼基围虾辣椒海鲜饭
必填
state
int
示例:1
必填

响应格式

{ "msg": "搜索成功", "total": 76, "pages": 8, "foods": [ { "unit": "千卡", "foodType": 1, "name": "桂圆肉", "weight": 100, "id": 605, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/82e07beb-3050-4732-a660-847c8a8b2ce1.png", "energy": 317 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(肥瘦)(X)", "weight": 100, "id": 675, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 395 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(肥)", "weight": 100, "id": 676, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 807 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(后臀尖)", "weight": 97, "id": 677, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 336 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(后肘)", "weight": 73, "id": 678, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 320 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(肋条肉)", "weight": 96, "id": 679, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 568 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(里脊)", "weight": 100, "id": 680, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 155 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(奶脯)[软五花、猪夹心]", "weight": 85, "id": 681, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 349 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(奶面)[硬五花]", "weight": 79, "id": 682, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 339 }, { "unit": "千卡", "foodType": 1, "name": "猪肉(前肘)", "weight": 77, "id": 683, "foodPic": "https://www.365healthy.net/uploadFiles/images/resource/12872929-74e9-4b92-8ff6-5733a999f2e8.png", "energy": 287 } ], "state": 1 }