QQ登录 账号密码登陆 官网首页

购物车订单填写页

对应的PC端页面

接口地址

URL地址

http://www.tpshop.com/index.php?m=Api&c=Cart&a=cart2

请求方式

post

参数列表

参数

是否必须

说明

user_id

必选

用户id

token
必须
token

成功案例

/**
{
    "status": 1,
    "msg": "获取成功",
    "result": {
        "addressList": {   // 收货人地址列表 可以多条
            "address_id": "12",
            "user_id": "1",
            "consignee": "彭佳育",
            "email": "05456@154.com",
            "country": "0",
            "province": "19",
            "city": "234",
            "district": "2309",
            "address": "天河区,天河城大道",
            "zipcode": "",
            "mobile": "13554797687",
            "is_default": "0"
        },
        "shippingList": [   // 物流列表
            {
                "code": "shentong",  // 物流code  表单提交的时候 需要用到
                "name": "申通物流",
                "version": "1.0",
                "author": "宇宙人",
                "config": "N;",
                "config_value": null,
                "desc": "申通物流插件 ",
                "status": "1",
                "type": "shipping",
                "icon": "https://wx.gtimg.com/mch/img/logo.png?v=20150602",
                "bank_code": "N;"
            },
            {
                "code": "shunfeng",
                "name": "顺丰物流",
                "version": "1.0",
                "author": "shunfeng",
                "config": "N;",
                "config_value": null,
                "desc": "顺丰物流插件 ",
                "status": "1",
                "type": "shipping",
                "icon": "https://wx.gtimg.com/mch/img/logo.png?v=20150602",
                "bank_code": "N;"
            }
        ],
        "cartList": [   // 购物车商品列表
            {
                "id": "95",  // 购物车id
                "user_id": "1",  
                "session_id": "tefb4doia7up3363cbie0acrn1",
                "goods_id": "1",   // 商品id
                "goods_sn": "ECS000000",     // 商品货号
                "goods_name": "荣耀 畅玩46",  // 商品名称
                "market_price": "1665.60",  // 市场价
                "goods_price": "100.00",   // 本店价
                "member_goods_price": "99.00",   // 会员价,如果会员没有折扣这里将跟goods_price一样
                "goods_num": "8",           //购买数量
                "spec_key": "1_4",
                "spec_key_name": "颜色2:红色 尺码:S",  // 购买的规格属性
                "bar_code": "001",    // 条码或者说是sku
                "selected": "1",   // 购物车复选框 选中状态
                "goods_fee": 800      // 小计
            },
            {
                "id": "97",
                "user_id": "1",
                "session_id": "132456789",
                "goods_id": "1",
                "goods_sn": "ECS000000",
                "goods_name": "荣耀 好玩46",
                "market_price": "1665.60",
                "goods_price": "300.00",
                "member_goods_price": "299.00",   // 会员价,如果会员没有折扣这里将跟goods_price一样                
                "goods_num": "10",
                "spec_key": "3_4",
                "spec_key_name": "颜色2:绿色 尺码:S",
                "bar_code": "003",
                "selected": "0",
                "goods_fee": 3000
            }
        ],
        "totalPrice": {
            "zj": 800,   // 总计金额
            "jy": 13324.8  // 共节约         
        },
        "couponList": [   // 优惠券列表
            {
                "name": "订单满100优惠券", // 优惠券名称
                "money": "50.00",    
                "condition": "200.00",
                "id": "1",   // 优惠券id
                "cid": "2",
                "type": "1",
                "uid": "1",
                "order_id": "3",
                "use_time": "1450361242",
                "code": null
            },
            {
                "name": "订单满100优惠券",
                "money": "50.00",
                "condition": "200.00",
                "id": "2",
                "cid": "2",
                "type": "1",
                "uid": "1",
                "order_id": "27",
                "use_time": "1451569279",
                "code": null
            }
        ],
        "userInfo": {
            "user_id": "1",   // 用户id
            "email": "",
            "username": "a",
            "password": "e10adc3949ba59abbe56e057f20f883e",
            "sex": "0",
            "birthday": "0000-00-00",
            "user_money": "1000.00",   // 用户余额
            "frozen_money": "0.00",
            "pay_points": "7600",    // 用户积分
            "rank_points": "0",
            "address_id": "0",
            "reg_time": "0",
            "last_login": "0",
            "last_time": "0000-00-00 00:00:00",
            "last_ip": "",
            "user_rank": "0",
            "parent_id": "0",
            "qq": "",
            "mobile": "",
            "is_validated": "0"
        }
    }
}
*/