相关推荐
商品详情页的「大家都在看」。目前服务端返回空列表,前端按空结果做兜底展示即可。
| 请求方式 | GET/POST |
|---|---|
| 接口路径 | /api/goods/related |
| Content-Type | - |
| 鉴权 | X-Nideshop-Token |
请求参数
| 参数 | 类型 | 必填 | 位置 |
|---|---|---|---|
id | String | 否 | URL 参数 |
categoryId | String | 否 | URL 参数 |
lat | Double | 否 | URL 参数 |
lon | Double | 否 | URL 参数 |
userId | Long | 否 | URL 参数 |
bookCondition | String | 否 | URL 参数 |
fulfillmentType | 对象 | 否 | URL 参数 |
pickupPointId | Integer | 否 | URL 参数 |
useVoucher | Boolean | 否 | URL 参数 |
keywords | String | 否 | URL 参数 |
key | String | 否 | URL 参数 |
isbn | String | 否 | URL 参数 |
isSelfSell | Boolean | 否 | URL 参数 |
warehouseId | Integer | 否 | URL 参数 |
curl 调用
curl -s 'https://www.8shu8.com/api/goods/related?id=xxx&categoryId=xxx&lat=xxx&lon=xxx&userId=1&bookCondition=xxx&fulfillmentType=xxx&pickupPointId=1&useVoucher=xxx&keywords=xxx&key=xxx&isbn=xxx&isSelfSell=xxx&warehouseId=1' \ -H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN'
响应示例
data 为分页对象,业务数据在 records。
{
"code": 200,
"message": "操作成功",
"success": true,
"data": {
"records": [
{
"isbn": "string",
"author": "string",
"pubdate": "string",
"pubYear": 1,
"binding": "string",
"translator": "string",
"pages": 1,
"categoryId": "string",
"imagesLarge": "string",
"publisher": "string",
"title": "string",
"price": 0.0,
"kaiben": "string",
"version": "string",
"wordCnt": "string",
"dtSource": "...",
"subtitle": "string",
"summary": "string",
"score": 0.0,
"label": "string",
"volume": "string",
"updateTime": "string",
"addTime": "string",
"recycle": true,
"doubanScore": 0.0,
"hasSub": 1,
"outmoded": 1,
"ban": true,
"sell": 1,
"demand": 1,
"contents": "string",
"recommendWords": "string",
"authorIntro": "string",
"weight": 0.0,
"ownActiveCode": true,
"oneIsbnMoreBook": true,
"suitBook": true,
"imageMd5": "string",
"sourceTitle": "string",
"kfzMinPrice": 0.0,
"bsMinPrice": 0.0,
"humanPrice": 0.0,
"kfzStock": 1,
"humanCheck": true,
"recycleMarkType": "...",
"recyclePrice": 0.0,
"recycleScore": 0.0,
"kfzSoldRate": 0.0,
"kfzSoldAvgPrice": 0.0,
"kfzSellShopCount": 1,
"kfzSellAvgPrice": 0.0,
"kfzLastSoldDay": 0.0,
"lastSaleDay": 0.0,
"bs3mSale": 0.0,
"bs3mSalePrice": 0.0,
"bsStock": 1,
"social": 1,
"goods": "...",
"name": "string",
"recycleUpdateTime": "string",
"gds": [
{
"headPhotoUrl": "...",
"id": "...",
"goodsStatus": "...",
"isbn": "...",
"goodsNumber": "...",
"addTime": "...",
"retailPrice": "...",
"createUserId": "...",
"updateTime": "...",
"shopId": "...",
"geo": "...",
"pushTime": "...",
"isSelfSell": "...",
"expiredTime": "...",
"second": "...",
"lat": "...",
"lon": "...",
"distance": "...",
"promotionDesc": "...",
"goods": "...",
"name": "...",
"parent": "..."
}
],
"searchContent": "string",
"headPhotoUrl": "string",
"goodsStatus": "...",
"goodsNumber": 1,
"retailPrice": 0.0,
"createUserId": 1,
"shopId": 1,
"geo": "string",
"pushTime": "string",
"isSelfSell": true,
"expiredTime": "string",
"second": true,
"lat": 1,
"lon": 1,
"distance": 0.0,
"promotionDesc": "string"
}
],
"total": 0,
"size": 10,
"current": 1,
"pages": 0
}
}