获取-二级商品分类
GET
http://hmajax.itheima.net/api/category/sub获取-二级商品分类
请求参数
Query 参数
id
string
顶级分类id
示例值:
1005000
示例代码
返回响应
成功(200)
请求参数缺失_AJAX(400)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
message
string
响应消息
data
object
响应数据
id
string
顶级分类id
name
string
顶级分类名字
picture
string
顶级分类图片
children
array [object {3}]
顶级分类下属二级分类数组
示例成功示例
{
"message": "获取子级分类成功",
"data": {
"id": "1005000",
"name": "居家",
"picture": "http://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-05-06/201516e3-25d0-48f5-bcee-7f0cafb14176.png",
"children": [
{
"id": "1005009",
"name": "茶咖酒具",
"picture": "https://yanxuan.nosdn.127.net/3102b963e7a3c74b9d2ae90e4380da65.png?quality=95&imageView"
},
{
"id": "1007000",
"name": "水具杯壶",
"picture": "https://yanxuan.nosdn.127.net/45b50d5f8afbd6fdef97314647dcb7db.png?quality=95&imageView"
},
{
"id": "1017000",
"name": "宠物食品",
"picture": "https://yanxuan.nosdn.127.net/b42a85ef15f856081ea9f49e5f6893e2.png?quality=95&imageView"
},
{
"id": "109248004",
"name": "宠物用品",
"picture": "https://yanxuan.nosdn.127.net/e766b09029ca00680d1e651b5cdc42bd.png?quality=95&imageView"
}
]
}
}
最后修改时间: 1 年前