请求URL:
POST/plugin.customer-center.frontend.controllers.customer.cart
参数:
| 参数名 | 是否必须 | 类型 | 说明 |
|---|---|---|---|
| member_id | 是 | int | 用户id |
返回示例:
正确时返回:
{
result: 1,
msg: "list",
data: {
total_goods_price: "0.00",
total_amount: "0.00",
discount_amount_items: [],
deduction_amount_items: [],
extra_charges_amount_items: [],
total_discount_amount: "0.00",
total_deduction_amount: "0.00",
total_extra_charges_amount: "0.00",
list: [{
is_alone: false,
link: "",
code: "shop",
name: "芸众商城",
merchant_id: 0,
shop_id: "fb54f3c5992b96d001bb16e8e92d968d",
discount_activity: [],
price: "0.00",
disable: false,
carts: [{
cart_id: 205,
goods_id: 18236,
goods_option_id: 1320716,
total: 1,
is_alone: false,
shop_id: "fb54f3c5992b96d001bb16e8e92d968d",
unit: "元",
style_type: "shop",
goods_title: "七格格2017夏装新款时尚通勤休闲圆领撞色拉链假两件连衣裙X1044",
goods_thumb: "http://www.wq.com/attachment/images/attachment/2/2020/08/9c39817c4e9f601c417ea0c272a22170.png",
discount_activity: [],
goods_price: "111.00",
price: "0.00",
estimated_price: "0.00",
goods_option_title: "SFSDFSD",
checked: false,
disable: false,
cart_goods_discounts: [],
cart_goods_deductions: [],
cart_goods_extra_charges: []
},
{
cart_id: 204,
goods_id: 18228,
goods_option_id: 0,
total: 1,
is_alone: false,
shop_id: "fb54f3c5992b96d001bb16e8e92d968d",
unit: "元",
style_type: "shop",
goods_title: "测试56565656565656",
goods_thumb: "http://www.wq.com/attachment/images/attachment/2/2020/08/9c39817c4e9f601c417ea0c272a22170.png",
discount_activity: [],
goods_price: "110.00",
price: "0.00",
estimated_price: "0.00",
checked: false,
disable: false,
cart_goods_discounts: [],
cart_goods_deductions: [],
cart_goods_extra_charges: []
},
{
cart_id: 202,
goods_id: 18254,
goods_option_id: 0,
total: 1,
is_alone: false,
shop_id: "fb54f3c5992b96d001bb16e8e92d968d",
unit: "元",
style_type: "shop",
goods_title: "测试发布商品",
goods_thumb: "http://www.wq.com/attachment/images/2/2019/07/m111GM5VuG0iPdxp5t4B4xM1PG01u4.jpg",
discount_activity: [],
goods_price: "101.11",
price: "0.00",
estimated_price: "0.00",
checked: false,
disable: false,
cart_goods_discounts: [],
cart_goods_deductions: [],
cart_goods_extra_charges: []
}
]
},
{
is_alone: false,
link: "",
code: "supplier",
name: "测试123",
merchant_id: 4,
shop_id: "262646b276e696034832abbdfddc7163",
discount_activity: [],
price: "0.00",
disable: false,
carts: [{
cart_id: 203,
goods_id: 18242,
goods_option_id: 0,
total: 1,
is_alone: false,
shop_id: "262646b276e696034832abbdfddc7163",
unit: "元",
style_type: "shop",
goods_title: "供应商自提点商品",
goods_thumb: "http://www.wq.com/attachment/image/b15684ff42548858abc066a6129b4c11.jpg",
discount_activity: [{
name: "满减",
code: "goodsReduce",
type: "string",
desc: "满2.00减1.00"
}],
goods_price: "10.00",
price: "0.00",
estimated_price: "0.00",
checked: false,
disable: false,
cart_goods_discounts: [],
cart_goods_deductions: [],
cart_goods_extra_charges: []
}]
}
]
}
}
###购物车集合数据说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| total_amount | int | 选中购物车金额总和 |
| discount_amount_items | array | 选中购物车优惠项 |
| deduction_amount_items | array | 选中购物车抵扣项 |
| extra_charges_amount_items | array | 选中购物车其他费用项 |
| total_discount_amount | string | 选中购物车优惠金额总和 |
| total_deduction_amount | string | 选中购物车抵扣项总和 |
| total_extra_charges_amount | string | 选中购物车其他费用项总和 |
购物车集合数据 discount_amount_items、deduction_amount_items、extra_charges_amount_items 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 优惠项标识 |
| name | string | 优惠项名称 |
| amount | string | 优惠项金额 |
###购物车列表分组数据 list
| 参数名 | 类型 | 说明 |
|---|---|---|
| shop_id | int | 店铺id |
| code | string | 标识唯一 |
| link | string | 店铺链接 |
| name | string | 店铺名称 |
| discount_activity | array | 店铺优惠信息 |
| price | string | 店铺商品总金额 |
| disable | bool | 店铺是否可选择 |
| carts | array | 店铺购物车商品组 |
###购物车列表商品数据 carts
| 参数名 | 类型 | 说明 |
|---|---|---|
| cart_id | int | 购物车ID |
| goods_id | int | 商品id |
| goods_option_id | int | 商品规格ID |
| total | int | 商品数量 |
| goods_title | string | 商品标题 |
| goods_thumb | string | 商品缩略图 |
| estimated_price | int | 预估价 |
| goods_price | int | 现价 |
| price | int | 支付价 |
| checked | bool | 是否选中 |
| disable | bool | 是否可选 |
| discount_activity | array | 商品优惠信息 |
| unit | string | 商品单位 暂无作用 |
| style_type | string | 区分插件商品显示样式 |
店铺和购物车商品 discount_activity 参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 优惠标识 |
| name | string | 优惠名称 |
| type | string | 优惠数据 暂无使用 |
| desc | string | 优惠数据详情 |
错误时返回:
{
"result": 0,
"msg":"错误提示",
"data": []
}
备注:
|data[0][created_at] |int |提现明细创建时间 |