简要描述:

获取商品详情页其他数据(seo)

请求域名:

  • http://xx.com

请求URL:

POST/plugin.pc-terminal.api.home.goods-detail

参数:

参数名 是否必须 类型 说明
gid int 商品id

返回参数说明:

参数名 类型 说明
seo array seo信息
seo.title string 标题
seo.keywords string 关键词
seo.description string 描述
hotGoods array 热销商品(5个)
hotGoods.id int 商品id
hotGoods.title string 商品名
hotGoods.thumb string 商品图片
hotGoods.market_price float 原价
hotCount int 热销商品数量
goods_count int 平台商品数量

返回示例:

正确时返回的数据:

{
	"result": 1,
	"msg": "ok",
	"data": {
		"seo": {
			"title": "供应商&&1&&2",
			"keywords": "",
			"description": ""
		},
		"hotGoods": [
			{
				"id": 17,
				"title": "供应商",
				"thumb": "images/1/2019/04/CKMtkg18KgmGA4kKa3PEX6D603ekDA.jpg",
				"market_price": "360.00",
				"price": "100.00",
				"cost_price": "40.00",
				"stock": 449,
				"real_sales": 6,
				"show_sales": 6,
				"virtual_sales": 0,
				"has_option": 0,
				"plugin_id": 92,
				"status_name": null
			},
			{
				"id": 24,
				"title": "测试招商",
				"thumb": "image/7b0e6463398f1890ac02074b5962655b.jpg",
				"market_price": "60.00",
				"price": "40.00",
				"cost_price": "40.00",
				"stock": 99994,
				"real_sales": 5,
				"show_sales": 5,
				"virtual_sales": 0,
				"has_option": 0,
				"plugin_id": 92,
				"status_name": null
			},
			{
				"id": 64,
				"title": "招商测试啊",
				"thumb": "image/0c0cf1a46404a8aa8e3834bf96d2011e.jpg",
				"market_price": "100.00",
				"price": "100.00",
				"cost_price": "100.00",
				"stock": 99,
				"real_sales": 1,
				"show_sales": 1,
				"virtual_sales": 0,
				"has_option": 0,
				"plugin_id": 92,
				"status_name": null
			},
			{
				"id": 26,
				"title": "鞋子",
				"thumb": "images/1/2019/04/Dmw50KFIME0mMjKdxRbfwpZXw0dkS0.png",
				"market_price": "150.00",
				"price": "100.00",
				"cost_price": "80.00",
				"stock": 29,
				"real_sales": 1,
				"show_sales": 1,
				"virtual_sales": 30,
				"has_option": 0,
				"plugin_id": 92,
				"status_name": null
			},
			{
				"id": 92,
				"title": "延迟?",
				"thumb": "image/e1de254b2b8f4fbc7661c9f60a732510.jpg",
				"market_price": "50.00",
				"price": "55.00",
				"cost_price": "40.00",
				"stock": 555555,
				"real_sales": 0,
				"show_sales": 0,
				"virtual_sales": 0,
				"has_option": 0,
				"plugin_id": 92,
				"status_name": null
			}
		]
	},
	"hotCount": 44,
	"goods_count": 0
}

错误时返回:

{
	"result": 0,
	"msg": "参数错误",
	"data": []
}

备注:

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