简要描述:
- 商品三级分类接口
请求域名:
- http://yunzshop.com
请求URL:
POST/app/index.php?i=1&c=entry&do=shop&m=yun_shop&route=goods.category.getThirdCategory
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
cate_id | 否 | int | 分类ID |
goods_name | 否 | string | 商品名称 |
sort_name | 否 | int | 排序方式 1-总和推荐 2-销量 3-价格 |
sort_status | 否 | int | 1-从大到小 2-从小到大 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "",
"data": {
"category": [
{
"id": 23,
"name": "2.2",
"uniacid": 3,
"parent_id": 19,
"thumb": "http://test-1251768088.cosgz.myqcloud.com/images/3/2017/11/g8sJ98sSB4YMJ4pBd4SMbVYyBBdSdS.jpg"
}
],
"goods": {
"total": 4,
"per_page": 10,
"current_page": 1,
"last_page": 1,
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 4,
"data": [
{
"id": 1,
"title": "支付测试",
"thumb": "http://wq2.com/attachment/images/3/2017/07/z1XplaLkFKd991D9CR8xNPC9ca3zKX.jpg",
"price": "0.01",
"status_name": null
},
{
"id": 34,
"title": "限购测试",
"thumb": "http://wq2.com/attachment/images/3/2017/09/dUVNVtadE6Exena2fuIn2aeX6TNVHh.jpg",
"price": "100.00",
"status_name": null
},
{
"id": 35,
"title": "支付测试",
"thumb": "https://test-1251768088.cosgz.myqcloud.com/images/3/2017/10/bav25ehFTuh0H8o0VUSMysz3H0yj9f.png",
"price": "0.01",
"status_name": null
},
{
"id": 73,
"title": "EXO",
"thumb": "http://wq2.com/attachment/images/3/2017/12/HTT4wCL7d13P3P3bOT6Qav2lTc2iq8.jpg",
"price": "50.00",
"status_name": null
}
]
}
}
}
错误时返回:
{
"result":0,
"msg":"未检测到分类数据!",
"data":{}
}
返回category分类列表参数说明:
参数名 | 类型 | 说明 |
---|---|---|
id | int | 分类ID |
uniacid | int | uniacid |
name | string | 分类名 |
thumb | string | 图片 |
parent_id | int | 父类ID |
返回goods参数说明:
参数名 | 类型 | 说明 |
---|---|---|
id | int | 商品id |
title | string | 商品名 |
thumb | string | 图片 |
price | int | 商品价格 |
备注:
- 更多返回错误代码请看首页的错误代码描述