简要描述:

  • 购物车数据接口

请求:

GET/&route=cart.list.index

参数:

参数名 是否必须 类型 说明
cart_ids string 选中的购物车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",
        "sharin_is_open": 0,
        "point_mall_total": 0,
        "list": [
            {
                "is_alone": false,
                "link": "",
                "code": "shop",
                "name": "哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                "merchant_id": 0,
                "shop_id": "fb54f3c5992b96d001bb16e8e92d968d",
                "discount_activity": [],
                "price": "0.00",
                "disable": false,
                "carts": [
                    {
                        "cart_id": 49,
                        "goods_id": 247,
                        "goods_option_id": 132,
                        "total": 1,
                        "is_alone": false,
                        "shop_id": "fb54f3c5992b96d001bb16e8e92d968d",
                        "unit": "元",
                        "style_type": "shop",
                        "goods_title": "丢",
                        "vip_price": "11.76",
                        "goods_thumb": "images/3/2018/01/dHOyarCMV4iYE2SRKoYodAD9w5wYCV.jpg",
                        "discount_activity": [],
                        "goods_price": "12.00",
                        "price": "0.00",
                        "estimated_price": "0.00",
                        "month_buy_limit": [],
                        "goods_option_title": "红色+G950+打哈",
                        "checked": false,
                        "disable": false,
                        "cart_goods_discounts": [],
                        "cart_goods_deductions": [],
                        "cart_goods_extra_charges": []
                    },
                    {
                        "cart_id": 26,
                        "goods_id": 164,
                        "goods_option_id": 0,
                        "total": 1,
                        "is_alone": false,
                        "shop_id": "fb54f3c5992b96d001bb16e8e92d968d",
                        "unit": "元",
                        "style_type": "shop",
                        "goods_title": "本地的哈哈步164",
                        "vip_price": "98.00",
                        "goods_thumb": "http://demo.yun.cn/static/upload/images/6/2018/06/hZqM1jQqjFmBhQ5JqQ48qSF5dmMMQZ.jpg",
                        "discount_activity": [],
                        "goods_price": "100.00",
                        "price": "0.00",
                        "estimated_price": "0.00",
                        "month_buy_limit": [],
                        "checked": false,
                        "disable": false,
                        "cart_goods_discounts": [],
                        "cart_goods_deductions": [],
                        "cart_goods_extra_charges": []
                    },
                    {
                        "cart_id": 22,
                        "goods_id": 99,
                        "goods_option_id": 0,
                        "total": 1,
                        "is_alone": false,
                        "shop_id": "fb54f3c5992b96d001bb16e8e92d968d",
                        "unit": "元",
                        "style_type": "shop",
                        "goods_title": "本地123",
                        "vip_price": "100.00",
                        "goods_thumb": "http://demo.yun.cn/static/upload/images/6/2018/04/yCfnKfcWicKXATi5fKI0watW8K0tz0.jpg",
                        "discount_activity": [],
                        "goods_price": "100.00",
                        "price": "0.00",
                        "estimated_price": "0.00",
                        "month_buy_limit": [],
                        "checked": false,
                        "disable": false,
                        "cart_goods_discounts": [],
                        "cart_goods_deductions": [],
                        "cart_goods_extra_charges": []
                    },
                    {
                        "cart_id": 21,
                        "goods_id": 100,
                        "goods_option_id": 0,
                        "total": 1,
                        "is_alone": false,
                        "shop_id": "fb54f3c5992b96d001bb16e8e92d968d",
                        "unit": "元",
                        "style_type": "shop",
                        "goods_title": "测试商品",
                        "vip_price": "200.00",
                        "goods_thumb": "http://demo.yun.cn/static/upload/images/6/2021/12/6164.jpg",
                        "discount_activity": [],
                        "goods_price": "200.00",
                        "price": "0.00",
                        "estimated_price": "0.00",
                        "month_buy_limit": [],
                        "checked": false,
                        "disable": false,
                        "cart_goods_discounts": [],
                        "cart_goods_deductions": [],
                        "cart_goods_extra_charges": []
                    }
                ]
            },
            {
                "is_alone": false,
                "link": "",
                "code": "supplier",
                "name": "供应商",
                "merchant_id": 11,
                "shop_id": "ab3cd2a168c36eb98bff08c7df82d860",
                "discount_activity": [],
                "price": "0.00",
                "disable": false,
                "carts": [
                    {
                        "cart_id": 50,
                        "goods_id": 239,
                        "goods_option_id": 0,
                        "total": 1,
                        "is_alone": false,
                        "shop_id": "ab3cd2a168c36eb98bff08c7df82d860",
                        "unit": "元",
                        "style_type": "shop",
                        "goods_title": "供应商商品",
                        "vip_price": "98.00",
                        "goods_thumb": "http://demo.yun.cn/static/upload/images/6/2018/01/gy1Y1ryFKZq6Y1XIY1GlB6GItUUKZb.jpg",
                        "discount_activity": [],
                        "goods_price": "100.00",
                        "price": "0.00",
                        "estimated_price": "0.00",
                        "month_buy_limit": [],
                        "checked": false,
                        "disable": false,
                        "cart_goods_discounts": [],
                        "cart_goods_deductions": [],
                        "cart_goods_extra_charges": []
                    }
                ]
            },
            {
                "is_alone": false,
                "link": "",
                "code": "supplier",
                "name": "测试",
                "merchant_id": 10,
                "shop_id": "8cc60aadfb4401634d3c505201ae9568",
                "discount_activity": [],
                "price": "0.00",
                "disable": false,
                "carts": [
                    {
                        "cart_id": 23,
                        "goods_id": 192,
                        "goods_option_id": 0,
                        "total": 1,
                        "is_alone": false,
                        "shop_id": "8cc60aadfb4401634d3c505201ae9568",
                        "unit": "元",
                        "style_type": "shop",
                        "goods_title": "供应商测试",
                        "vip_price": "98.00",
                        "goods_thumb": "images/6/2018/09/XPjqi1ZggRG20Ai44gZ4VIj0GcAjz0.png",
                        "discount_activity": [],
                        "goods_price": "100.00",
                        "price": "0.00",
                        "estimated_price": "0.00",
                        "month_buy_limit": [],
                        "checked": false,
                        "disable": false,
                        "cart_goods_discounts": [],
                        "cart_goods_deductions": [],
                        "cart_goods_extra_charges": []
                    }
                ]
            },
            {
                "is_alone": true,
                "link": "",
                "code": "lease-toy",
                "name": "租赁",
                "merchant_id": 0,
                "shop_id": "4966bec1e65ae08871d7b45ecaa546c7",
                "discount_activity": [],
                "price": "0.00",
                "disable": false,
                "carts": [
                    {
                        "cart_id": 48,
                        "goods_id": 246,
                        "goods_option_id": 112,
                        "total": 1,
                        "is_alone": true,
                        "shop_id": "4966bec1e65ae08871d7b45ecaa546c7",
                        "unit": "元",
                        "style_type": "lease-toy",
                        "goods_title": "租赁规格测试",
                        "vip_price": "98.00",
                        "goods_thumb": "https://localhost/attachment/images/6/2021/11/6acc8f6440d7d62361b2fbfdbe2a19ea.jpg",
                        "discount_activity": [],
                        "goods_price": "100.00",
                        "price": "0.00",
                        "estimated_price": "0.00",
                        "month_buy_limit": [],
                        "goods_option_title": "111",
                        "checked": false,
                        "disable": false,
                        "lease_goods": {
                            "is_lease": 1,
                            "is_rights": 1,
                            "goods_deposit": "0.00"
                        },
                        "cart_goods_discounts": [],
                        "cart_goods_deductions": [],
                        "cart_goods_extra_charges": []
                    }
                ]
            }
        ],
        "invalid_cart": [
            {
                "id": 25,
                "goods_id": 191,
                "total": 1,
                "option_id": 0,
                "created_at": "2017-12-05 11:56:24",
                "plugin_id": 0,
                "goods_title": "dqwdqw",
                "goods_thumb": "images/6/2018/09/S663yOEeul0L2O5p5LCqu55OEo75CZ.png",
                "goods_price": "41.00",
                "goods_option_title": ""
            },
            {
                "id": 24,
                "goods_id": 194,
                "total": 1,
                "option_id": 0,
                "created_at": "2017-11-15 13:59:04",
                "plugin_id": 0,
                "goods_title": " 第三个",
                "goods_thumb": "images/6/2018/09/HQTWP1PuvpuJJ9aZAn214QTqZ4mAj4.jpg",
                "goods_price": "431.00",
                "goods_option_title": "",
                "member": {
                    "uid": 2461,
                    "uniacid": 6,
                    "mobile": "15219025049",
                    "email": "",
                    "groupid": 6,
                    "credit1": "329.00",
                    "credit2": "8137.00",
                    "credit3": "0.00",
                    "credit4": "0.00",
                    "credit5": "0.00",
                    "credit6": "0.00",
                    "createtime": 1510047549,
                    "realname": "测试",
                    "nickname": "cc",
                    "signature": null,
                    "avatar": "",
                    "qq": "",
                    "vip": 0,
                    "gender": 0,
                    "birthyear": 0,
                    "birthmonth": 0,
                    "birthday": 0,
                    "constellation": "",
                    "zodiac": "",
                    "telephone": "",
                    "idcard": "",
                    "studentid": "",
                    "grade": "",
                    "address": "",
                    "zipcode": "",
                    "nationality": "",
                    "resideprovince": "省",
                    "residecity": "市",
                    "residedist": "",
                    "graduateschool": "",
                    "company": "",
                    "education": "",
                    "occupation": "",
                    "position": "",
                    "revenue": "",
                    "affectivestatus": "",
                    "lookingfor": "",
                    "bloodtype": "",
                    "height": "",
                    "weight": "",
                    "alipay": "",
                    "msn": "",
                    "taobao": "",
                    "site": "",
                    "bio": "",
                    "interest": "",
                    "avatar_image": "",
                    "username": "cc"
                }
            }
        ]
    }
}

###购物车集合数据说明

参数名 类型 说明
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 选中购物车其他费用项总和
list array 购物车列表
invalid_cart array 失效购物车列表

购物车集合数据 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 店铺购物车商品组

###购物车列表失效商品数据 invalid_cart

参数名 类型 说明
id int 购物车ID
goods_id int 商品id
goods_option_id int 商品规格ID
total int 商品数量
goods_title string 商品标题
goods_option_title string 商品规格标题
goods_thumb string 商品缩略图
goods_price int 现价

###购物车列表商品数据 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": []
  }

备注:

  • 更多返回错误代码请看首页的错误代码描述