简要描述:
-选购页根据分类获取商品
请求域名:
- http://xx.com
请求URL:
plugin.chain-store.frontend.controller.index.search-goods
请求参数说明:
参数名 | 类型 | 是否必需 | 说明 |
---|---|---|---|
keyword | int | 否 | 搜索关键词 |
store_id | int | 是 | 门店ID |
返回示例:
正确时返回:
{
result: 1,
msg: "success",
data: {
list: {
current_page: 1,
data: [
{
has_option: 0,
id: 92666,
thumb: "https://dev4.yunzmall.com/attachment/images/9/2022/04/5ff91797b219433c3000ba4c478d1528.jpg",
plugin_id: 32,
total_sales: 10,
market_price: "188.00",
price: "98.00",
min_price: "98.00",
max_price: "98.00",
cost_price: "0.00",
title: "完美日记小细跟许愿星限定礼盒彩妆口红送女友礼物套盒",
stock: 994,
goods_id: 92666,
status_name: null,
vip_price: "98.00",
vip_next_price: "88.20",
price_level: "2",
is_open_micro: 1,
vip_level_status: {
status: 0,
word: "",
tips: ""
},
has_many_options: [ ],
has_many_goods_discount: [
{
id: 79427,
goods_id: 92666,
level_discount_type: 1,
discount_method: 1,
level_id: 0,
discount_value: "",
created_at: "2023-01-10 09:57:57",
updated_at: "2023-01-10 09:57:57",
deleted_at: null
},
{
id: 79435,
goods_id: 92666,
level_discount_type: 1,
discount_method: 1,
level_id: 32,
discount_value: "",
created_at: "2023-01-10 09:57:57",
updated_at: "2023-01-10 09:57:57",
deleted_at: null
}
]
},
{
has_option: 0,
id: 92668,
thumb: "https://dev4.yunzmall.com/attachment/images/9/2022/04/74c00bb6af77f214c2fdb894fbf9e814.jpg",
plugin_id: 32,
total_sales: 88,
market_price: "0.00",
price: "80.00",
min_price: "80.00",
max_price: "80.00",
cost_price: "0.00",
title: "股东分红指定商品等级二",
stock: 100,
goods_id: 92668,
status_name: null,
vip_price: "70.00",
vip_next_price: "69.00",
price_level: "2",
is_open_micro: 1,
vip_level_status: {
status: 0,
word: "",
tips: ""
},
has_many_options: [ ],
has_many_goods_discount: [
{
id: 79445,
goods_id: 92668,
level_discount_type: 1,
discount_method: 2,
level_id: 0,
discount_value: "10",
created_at: "2023-01-10 09:57:57",
updated_at: "2023-01-10 09:57:57",
deleted_at: null
},
{
id: 79450,
goods_id: 92668,
level_discount_type: 1,
discount_method: 2,
level_id: 17,
discount_value: "",
created_at: "2023-01-10 09:57:57",
updated_at: "2023-01-10 09:57:57",
deleted_at: null
},
]
},
],
first_page_url: "https://dev4.yunzmall.com/addons/yun_shop/api.php?page=1",
from: 1,
last_page: 3,
last_page_url: "https://dev4.yunzmall.com/addons/yun_shop/api.php?page=3",
next_page_url: "https://dev4.yunzmall.com/addons/yun_shop/api.php?page=2",
path: "https://dev4.yunzmall.com/addons/yun_shop/api.php",
per_page: 20,
prev_page_url: null,
to: 20,
total: 50
}
}
}
错误时返回:
{
"result": 0,
"msg": "请登录",
"data": []
}
返回参数说明:(有些信息我也不知道是什么,大体与接口goods.goods.search-goods的商品数据一致)
参数名 | 类型 | 说明 |
---|---|---|
has_option | int | 是否开启规格,1开启0关闭 |
id | id | 商品ID |
goods_id | id | 商品ID |
thumb | string | 商品图片 |
title | string | 商品标题 |
stock | int | 库存 |
total_sales | int | 总销量 |
market_price | float | 市场价 |
price | float | 现价 |
max_price | float | 最低价 |
min_price | float | 最高价 |
vip_price | float | 会员价 |
vip_next_price | float | 下一会员价 |
has_many_options | array | 规格信息 |