书市商品列表
书市首页的商品列表,可按关键字、分类、价格、品相筛选和排序,返回分页商品并补齐书名、定价等信息。
| 请求方式 | GET/POST |
|---|---|
| 接口路径 | /api/goods/index |
| Content-Type | - |
| 鉴权 | 免登录(无需 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/index?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'
响应示例
data 为分页对象,业务数据在 records。
{
"code": 200,
"message": "操作成功",
"success": true,
"data": {
"records": [
{
"id": "string",
"name": "string",
"title": "string",
"isbn": "string",
"goodsSn": "string",
"categoryId": "string",
"author": "string",
"publisher": "string",
"primaryPicUrl": "string",
"retailPrice": 0.0,
"marketPrice": 0.0,
"bookCondition": "string",
"bookConditionText": "string",
"goodsNumber": 1,
"shopId": 1
}
],
"total": 0,
"size": 10,
"current": 1,
"pages": 0
}
}