简要描述:

PC端-获取分类导航数据

请求域名:

  • http://xx.com

请求URL:

POST/plugin.pc-terminal.api.goods.get-home-category

返回参数说明:

参数名 类型 说明
id int 分类id
level int 分类等级,1一级,2二级。。
name string 分类名
parent_id int 上级id
thumb string 分类图片,thumb_src绝对路径
pc_adv_img string 分类广告图(pc_adv_img_src绝对地址)
pc_adv_url string 分类广告图跳转链接)
children array 所属二级导航信息(字段与一级一致)

返回示例:

正确时返回的数据:

{
	"result": 1,
	"msg": "ok",
	"data": {
		"total": 1,
		"per_page": 20,
		"current_page": 1,
		"last_page": 1,
		"next_page_url": null,
		"prev_page_url": null,
		"from": 1,
		"to": 1,
		"data": [
			{
				"id": 1,
				"level": 1,
				"name": "1",
				"parent_id": 0,
				"thumb": "images/1/2019/12/oleLBE9pWkxb4BLRXBhBzHZpbt9txC.jpg",
				"thumb_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/12/oleLBE9pWkxb4BLRXBhBzHZpbt9txC.jpg",
				"children": [
					{
						"id": 2,
						"level": 2,
						"name": "2",
						"parent_id": 1,
						"thumb": "images/1/2019/12/oleLBE9pWkxb4BLRXBhBzHZpbt9txC.jpg",
						"thumb_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/12/oleLBE9pWkxb4BLRXBhBzHZpbt9txC.jpg"
					}
				]
			}
		]
	}
}

错误时返回:

{
	"result": 0,
	"msg": "",
	"data": []
}

备注:

  • 更多返回错误代码请看首页的错误代码描述