简要描述:

  • 获取一级分类的子级分类

请求域名:

  • http://xx.com

请求URL:

GET/route=goods.category.child-category

旧URL:

GET/route=goods.category.get-children-category

参数:

参数名 类型 是否必须 说明
parent_id int 一级分类id

返回示例:

正确时返回:

{
	result: 1,
	msg: "success",
	data: {
		category: {
			current_page: 1,
			data: [
				{
					id: 85233,
					name: "二级1",
					thumb: "https://dev4.yunzmall.com/attachment/images/9/2022/01/55390c3ae5dc85fe16b03e991f30c52c.png",
					adv_img: "",
					adv_url: "",
					parent_id: 66754,
					description: "",
					display_order: 0,
					level: 2,
					advimg_pc: "",
					advurl_pc: "",
					small_adv_url: "",
					pc_adv_img: null,
					pc_adv_url: null,
					has_many_children: [
						{
							id: 85236,
							uniacid: 9,
							name: "二级11",
							thumb: "images/9/2022/01/804d71a39193211b119b8b463e409fd2.jpg",
							parent_id: 85233,
							description: "",
							display_order: 0,
							enabled: 1,
							is_home: 1,
							adv_img: "",
							adv_url: "",
							level: 3,
							advimg_pc: "",
							advurl_pc: "",
							created_at: "2022-01-13 15:35:58",
							updated_at: "2022-01-13 15:35:58",
							deleted_at: null,
							plugin_id: 0,
							filter_ids: "",
							small_adv_url: "",
							pc_adv_img: null,
							pc_adv_url: null
						}
					]
				},
				{
					id: 85234,
					name: "二级2",
					thumb: "",
					adv_img: "",
					adv_url: "",
					parent_id: 66754,
					description: "",
					display_order: 0,
					level: 2,
					advimg_pc: "",
					advurl_pc: "",
					small_adv_url: "",
					pc_adv_img: null,
					pc_adv_url: null,
					has_many_children: [
						{
							id: 85237,
							uniacid: 9,
							name: "二级22",
							thumb: "images/9/2022/01/804d71a39193211b119b8b463e409fd2.jpg",
							parent_id: 85234,
							description: "",
							display_order: 0,
							enabled: 1,
							is_home: 1,
							adv_img: "",
							adv_url: "",
							level: 3,
							advimg_pc: "",
							advurl_pc: "",
							created_at: "2022-01-13 15:36:12",
							updated_at: "2022-01-13 15:36:12",
							deleted_at: null,
							plugin_id: 0,
							filter_ids: "",
							small_adv_url: "",
							pc_adv_img: null,
							pc_adv_url: null
						}
					]
				},
			],
			first_page_url: "https://dev4.yunzmall.com/addons/yun_shop/api.php?page=1",
			from: 1,
			last_page: 1,
			last_page_url: "https://dev4.yunzmall.com/addons/yun_shop/api.php?page=1",
			next_page_url: null,
			path: "https://dev4.yunzmall.com/addons/yun_shop/api.php",
			per_page: 1000,
			prev_page_url: null,
			to: 5,
			total: 5
		}
	}
}

错误时返回:

  {
    "result": 0,
    "msg": "获取失败"
  }
             |

返回参数说明:

参数名 类型 说明
category array 子分类数据,与旧接口数据格式一致,包含has_many_children(三级分类)

备注:

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