简要描述:

  • 公众号商品列表

请求URL:

post:plugin.goods-assistant.admin.ImportUniacid.getGoodsData

参数:search[]

参数名 是否必须 类型 说明
search[keyword] string 关键字
search[uniacid] int 导入公众号ID
search[brand_id] int 品牌id
search[min_price] int 最低价
search[max_price] int 最高价
search[product_attr] string 商品类型 是否热卖/促销等,值为is_hot/is_new/is_recommand/is_comment

例:商品类型 [product_attr] => Array ( [0] => is_new [1] => is_hot [2] => is_recommand [3] => is_discount )

参数:category[]

参数名 是否必须 类型 说明
category[parentid] int 一级
category[childid] int 二级
category[thirdid] int 三级

参数:real_sales

参数名 是否必须 类型 说明
real_sales int 销量排序

返回示例:

{
"result":1,
"msg":"请求成功",
"data":{
	"current_page":1,
	"data":[{
				"id":4,
				"type":1,
				"title":"华为",
				"thumb":"http://yz.yunshop.com/static/upload/images/3/2022/04/f410401f4a50525ab2c6d1dd9b3c765a.jpg",
				"market_price":"0.00",
				"price":"0.00",
				"cost_price":"0.00",
				"plugin_id":0,
				"has_option":1,
				"status":1,
				"stock":12121,
				"promotion_rate":"nan",
				"is_presence":1,
				"status_name":"\u4e0a\u67b6"
				},
				{
				"id":3,
				"type":1,
				"title":"华为",
				"thumb":"http://yz.yunshop.com/static/upload/images/3/2022/04/f410401f4a50525ab2c6d1dd9b3c765a.jpg",
				"market_price":"0.00",
				"price":"0.00",
				"cost_price":"0.00",
				"plugin_id":0,
				"has_option":1,
				"status":1,
				"stock":1000,
				"promotion_rate":"nan",
				"is_presence":1,
				"status_name":"\u4e0a\u67b6"
			}],
			"first_page_url":"http://yz.yunshop.com/admin/shop?page=1",
			"from":1,
			"last_page":1,
			"last_page_url":"http://yz.yunshop.com/admin/shop?page=1",
			"next_page_url":null,
			"path":"http://yz.yunshop.com/admin/shop",
			"per_page":20,
			"prev_page_url":null,
			"to":2,
			"total":2			
		}
}

错误时返回:

{
result: 0,
msg: "商品不存在.",
data: [ ]
}

返回参数说明

参数名 类型 说明
id int 商品ID
type int 商品类型: 1为实体,2为虚拟
title string 商品标题
thumb string 商品图片完整路径
market_price float 商品市场价(元)
price float 商品金额(元)
cost_price float 成本价(元)
plugin_id int
has_option int 是否有规格 1是 0否
status int 商品状态: 1上架,0下架
stock int 库存
is_presence int 是否导入 1是 0否
status_name string 商品状态