分类
分类
/favorite/list/get 获取常用列表
Method: GET
请求:
无
响应:
code M int 返回码 0为成功、其他为错误
msg M string 信息提示
data O list 成功时常用列表信息,json格式
[{
id M int 常用列表ID
name M string 常用列表名称
count M int 列表中商品数量
list M list 常用列表中spu_ids
[
spu_id M string spu ID
[
}]
示例:
{
msg: "ok",
data: [{
count: 4,
list: [
"C00001",
"C00004",
"C00003",
"C00005"
],
name: "11",
id: 2
}],
code: 0
}
/product/promotion_sku/get 获取营销规则里的商品
Method:
POST
请求
promotion_id M int
label_2_id O int
响应
msg M
code M
data M
cart_amount M int
id M str spu_id,
img_url M str
img_urls M list 商品图片列表
is_fav: false,
name: str,
rank: 0,
salemenu_id: str,
std_sale_price: int,
std_unit_name: str,
skus M list sku信息
cart_amount M int 购物车数量
category_id_1 M str
category_id_2 M str
label_2_id M
desc M str 描述
id M str sku_id,
img_url M str
img_urls M list
is_valid M bool
name M str 名称
rule_price M float
sale_num_least M int
sale_price M float 销售价格
sale_ratio M float
sale_unit_name M str 销售单位
salemenu_id M str 报价单id
spu_id M str
state M int
station_id M str
std_sale_price M float
std_unit_name M str
stocks M int 库存
promotion_price C float 活动价
limit_number C int 限购数
frequency M int
is_price_timing M bool 是否时价
clean_food M bool
]
}
]
返回示例:
{
"code": 0,
"msg": "ok",
"data": [
{
"salemenu_id": "S6977",
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
],
"std_sale_price": 0,
"rank": 0,
"id": "C920981",
"std_unit_name": "件",
"is_fav": false,
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"skus": [
{
"salemenu_id": "S6977",
"category_id_2": "B21012",
"sale_num_least": 1,
"sale_price": 0,
"name": "帝王蕉1",
"frequency": 0,
"cart_amount": 0,
"std_sale_price": 100,
"sale_unit_name": "箱",
"rule_price": null,
"label_2_id": null,
"station_id": "T8521",
"category_id_1": "A4507",
"is_valid": true,
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
],
"desc": "这是一个商品的描述看能不能成事。",
"id": "D2734104",
"is_price_timing": true,
"stocks": -99999,
"std_unit_name": "件",
"limit_number": null,
"state": 1,
"sale_ratio": 24,
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"clean_food": false,
"spu_id": "C920981",
"promotion_price": null
}
],
"name": "帝王蕉",
"cart_amount": 0
}
]
}
/product/category/get 获取商品分类
/product/promotion/list 获取station客户自己添加的营销活动信息
/cart/get 获取购物车
跳转链接:/cart/get
/product/frequent/sku/search 常用商品接口
Method:
GET
请求:
无
响应:
code M int 返回码,0表示成功,其他表示错误
data M
cart_amount M int
id M str spu_id,
img_url M str
img_urls M list 商品图片列表
is_fav: false,
name: str,
rank: 0,
salemenu_id: str,
std_sale_price: int,
std_unit_name: str,
skus M list sku信息
cart_amount M int 购物车数量
category_id_1 M str
category_id_2 M str
desc M str 描述
id M str sku_id
img_url M str
img_urls M list
is_valid M bool
name M str 名称
rule_price M float
sale_num_least M int
sale_price M float 销售价格
sale_ratio M float
sale_unit_name M str 销售单位
salemenu_id M str 报价单id
spu_id M str
state M int
station_id M str
std_sale_price M float
std_unit_name M str
stocks M int 库存
promotion_price C float 活动价
limit_number C int 限购数
frequency M int
is_price_timing M bool 是否时价
clean_food M bool
]
}
]
返回示例:
{
"code": 0,
"msg": "ok",
"data": [
{
"salemenu_id": "S6977",
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
],
"std_sale_price": 0,
"rank": 0,
"id": "C920981",
"std_unit_name": "件",
"is_fav": false,
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"skus": [
{
"salemenu_id": "S6977",
"category_id_2": "B21012",
"sale_num_least": 1,
"sale_price": 0,
"name": "帝王蕉1",
"frequency": 0,
"cart_amount": 0,
"std_sale_price": 100,
"sale_unit_name": "箱",
"rule_price": null,
"label_2_id": null,
"station_id": "T8521",
"category_id_1": "A4507",
"is_valid": true,
"img_urls": [
"https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg"
],
"desc": "这是一个商品的描述看能不能成事。",
"id": "D2734104",
"is_price_timing": true,
"stocks": -99999,
"std_unit_name": "件",
"limit_number": null,
"state": 1,
"sale_ratio": 24,
"img_url": "https://img.guanmai.cn/product_pic/07a6b3ab586a812a.jpeg",
"clean_food": false,
"spu_id": "C920981",
"promotion_price": null
}
],
"name": "帝王蕉",
"cart_amount": 0
}
]
}
/favorite/list/add 增加常用列表
Method: GET
请求:
name M str
响应:
code M int 返回码 0为成功、其他为错误
msg M string 信息提示
data O list 成功时常用列表信息,json格式
[{
id M int 常用列表ID
name M string 常用列表名称
count M int 列表中商品数量
list M list 常用列表中spu_ids
[
spu_id M string spu ID
[
}]
示例:
{
msg: "ok",
data: [{
count: 4,
list: [
"C00001",
"C00004",
"C00003",
"C00005"
],
name: "11",
id: 2
}],
code: 0
}
/cart/update 更新购物车
Method:
POST
请求:
data M dict 商品信息{sku_id: amount} {"D7557005":0, "RW123333":1}
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data O dict 成功时返回购物车信息,json格式
{
info M dict 购物车数据
{
count M int 购物车商品数量
sum_money M int 购物车商品总价
reward_sku_count M int 积分商品总数
is_price_timing M bool 是否时价
total_cost_points M int 商品总消耗积分
},
invalid_skus M list 无效商品信息
[{
code M int 错误码(1:商品下架;2:商品库存不足)
msg M string 错误提示
sku_id M string 商品ID
name M string 商品名
stocks O int 商品库存数量(商品库存不足时返回)
}],
reward_sku_list M dict 积分商品ID及数量
{
"RW123333":1
}
list M dict 购物车商品ID及数量
{
sku_id M string 商品ID及数量
}
}
示例:
{"code": 0,
"msg": "ok",
"data": {
"info":
{"reward_sku_count": 0,
"count": 1,
"sum_money": 100.0,
"is_price_timing": false,
"total_cost_points": 0},
"invalid_skus": [{
code: 2,
msg: '商品库存不足',
sku_id: 'D1572278',
name: '白菜',
stocks: 0
}],
"reward_sku_list": {
"RW123333":1,
"RW44442":4},
"list":
{"D15933122": 1.0}
}
}