文档
测试
GET
域名+ /index/goods/goods_list

接口描述

请求参数见下方注释

请求参数

参数名
类型
描述
必填
parentid
int
商品的分类parenid 即商品的二级分类id。 不传时,即所有的商品
必填
goodsname
string
搜索的商品名称
必填
label
int
1,2,3,4预售,包邮, 直降, 新品
必填
minprice
decimal
最低价
必填
maxprice
decimal
最高价
必填
brand_id
int
品牌id
必填
order
int
排序字段名
必填
order_type
int
排序字段值
必填
page
int
当前页码
必填
pagenum
int
每页条数
必填
time
string
发起请求时间 第一次给 ‘’ 后面用返回的time
必填

响应参数

参数名
类型
描述
必填
data
object
数据字典
必填
total
int
示例:1
必填
per_page
int
示例:4
必填
current_page
int
示例:1
必填
last_page
int
示例:1
必填
data
array
数据列表
必填
id
int
示例:1
必填
parentid
int
示例:9
必填
brand_id
int
示例:2
必填
is_sale
int
示例:0 预售 0未勾选 1选中
必填
is_new
int
示例:1 新品 0未勾选 1选中
必填
is_free
int
示例:0 包邮 0未勾选 1选中
必填
is_down
int
示例:0 直降 0未勾选 1选中
必填
goodsname
string
示例:TEST 商品名称
必填
goodsprice
string
示例:1.00 价格
必填
goodsdesc
string
示例:TEST2 商品描述
必填
imgs
string
示例:42
必填
goods_type
int
示例:0 0精选1热销
必填
create_time
string
示例:2021-03-19 11:04:12
必填
update_time
string
示例:2021-03-19 11:04:12
必填
img
string
示例:20210319/2f82c93fe001e59466b4bae9f6553fc2.png
必填
brand_name
string
示例:LV 品牌名称
必填
off_price
打折前价格
必填
count
int
示例:1
必填
time
string
示例:2021-03-23 17:20:05
必填

说明 / 示例

1排序传入两个字段:order排序字段名 、order_type排序字段值 综合:order:time、 order_type :0, 精选:order:goods_type 、order_type:1 热门:order:goods_type 、order_type:0 最新:order:update_time 、order_type:0 价格由高到低:order:goodsprice 、order_type:0 价格由低到高:order:goodsprice 、order_type:1 上架时间由近及远:order:create_time 、order_type:0 上架时间由远及近:order:create_time 、order_type:1 评价由高到低:order:score 、order_type:0 销量由高到低:order:sales 、order_type:0 2 2.1折扣与服务 选择预售传入 {label:1} 选择包邮传入 {label:2} 选择直降传入 {label:3} 选择新品传入 {label:4} 2.1价位区间 最低价、最高价 { minprice:0, maxprice:1000 } 2.3品牌 传入品牌id brand_id