curl--location--request GET '/api/goods?per_page=10&page=1' \
--header'Accept;' \
--header'X-Requested-With;'
返回响应
🟢200成功
application/json
Body
data
array[object (Goods) {18}]
数据
必需
id
integer
商品 id
必需
category_id
integer
分类 id
必需
type_id
integer|null
类型 id
必需
brand_id
integer|null
品牌 id
必需
goods_sn
string
商品编号
必需
name
string
商品名称
必需
cover_image
string
封面图
必需
description
string|null
描述
可选
price
integer
价格
必需
on_sale
integer
是否上架
必需
sold_count
integer
销量
必需
stock
integer
库存
必需
created_at
integer
创建时间
必需
content
array[string]
详细
可选
attr
array [object {2}] |null
属性
可选
part
array [object {2}] |null
可选
spec
array [object {2}] |null
规格
可选
skus
array[object (GoodsSku) {7}]
可选
code
integer
返回码
必需
200: 成功
message
string
信息
必需
meta
object(Pagination)
分页
必需
current_page
integer
当前页码
必需
last_page
integer
最大页码
必需
per_page
integer
每页条数
必需
total
integer
总记录数
必需
示例
{"data":[{"id":1,"merchant_id":1,"merchant":{"id":1,"user_id":1,"category_id":34,"address":"\u897f\u5b89\u6c88\u6cb3\u533a","logo":"https:\/\/via.placeholder.com\/640x480.png","description":"Occaecati reprehenderit nemo maiores et velit.","name":"\u80e1\u91d1\u51e4","position":{"lat":39.90923,"lng":116.397428,"address":"\u897f\u5b89\u6c88\u6cb3\u533a"},"profit_ratio":50,"sold_count":0},"category_id":3,"type_id":3,"brand_id":1,"goods_sn":"1016","name":"\u4e09\u661fGalaxy Noet10+ 5G(SM-N9760)","cover_image":"https:\/\/img14.360buyimg.com\/n5\/s54x54_jfs\/t1\/85701\/3\/3164\/116271\/5ddcffaeEd7924f35\/013d69c48b507982.jpg","description":null,"price":"6499.00","vip_price":"6499.00","on_sale":1,"sold_count":1,"stock":100,"created_at":1660618730}],"code":200,"message":"","meta":{"current_page":1,"last_page":1,"per_page":15,"total":2}}