文档
测试

获取所有分类的货物列表

POST
http://xhf.qmbzch.cn/api/product_class/get_product_all

请求参数

参数名
类型
描述
必填
product_class_id
int
分类id 非必填 填写后即返回该分类id的数据
必填
page
int
页码
必填
page_size
int
分页大小
必填

响应参数

参数名
类型
描述
必填
state
string
示例:ok
必填
message
string
示例:查询成功
必填
data
array
数据列表
必填
id
int
示例:2
必填
name
string
示例:蔬菜
必填

说明 / 示例

{ "state": "ok", "message": "ok", "data": [ { "product_class_id": 2,//分类id "product_class_name": "蔬菜",//分类名称 "list": [//该分类下的货物信息 { "product_id": 1,//货物id "product_name": "西红柿",//货物名称 "product_code": "20312",//货物编码 "state": 1,//货物状态 1开启 0关闭 "other_code": "2021"//其他编码 }, { "product_id": 2, "product_name": "小西红柿", "product_code": "20313", "state": 1, "other_code": "2022" }, { "product_id": 3, "product_name": "白菜", "product_code": "20314", "state": 1, "other_code": "2022" }, { "product_id": 4, "product_name": "东瓜", "product_code": "20315", "state": 1, "other_code": "2022" } ] }, { "product_class_id": 3, "product_class_name": "肉类", "list": [ { "product_id": 1, "product_name": "西红柿", "product_code": "20312", "state": 1, "other_code": "2021" }, { "product_id": 2, "product_name": "小西红柿", "product_code": "20313", "state": 1, "other_code": "2022" }, { "product_id": 3, "product_name": "白菜", "product_code": "20314", "state": 1, "other_code": "2022" }, { "product_id": 4, "product_name": "东瓜", "product_code": "20315", "state": 1, "other_code": "2022" } ] }, { "product_class_id": 4, "product_class_name": "海鲜", "list": [ { "product_id": 1, "product_name": "西红柿", "product_code": "20312", "state": 1, "other_code": "2021" }, { "product_id": 2, "product_name": "小西红柿", "product_code": "20313", "state": 1, "other_code": "2022" }, { "product_id": 3, "product_name": "白菜", "product_code": "20314", "state": 1, "other_code": "2022" }, { "product_id": 4, "product_name": "东瓜", "product_code": "20315", "state": 1, "other_code": "2022" } ] } ] }