购物车商品列表

简要描述
  • 获取当前用户的购物车商品列表
请求url
  • https://www.商城域名.com/index.php?s=/api/cart/list
请求方式
  • GET
是否需授权登录
请求header
参数名 类型 是否必须 示例值 说明
storeId int 必填 10001 商城ID
platform string 必填 H5 当前请求的客户端(APP、小程序、H5等)
Access-Token string 选填 - 当前登录用户的 Token
返回示例
{
  "status": 200,
  "message": "success",
  "data": {
    "cartTotal": 2,
    "list": [{
      "id": 28,
      "goods_id": 10019,
      "goods_sku_id": "0",
      "goods_num": 1,
      "user_id": 10125,
      "goods": {
        "goods_id": 10019,
        "goods_name": "清野の木 56L灰色特大号 塑料收纳箱整理箱环保加厚储物箱",
        "goods_no": "",
        "video_id": 0,
        "video_cover_id": 0,
        "selling_point": "",
        "spec_type": 10,
        "goods_price_min": "31.50",
        "goods_price_max": "31.50",
        "line_price_min": "0.00",
        "line_price_max": "0.00",
        "stock_total": 83,
        "delivery_id": 10001,
        "is_points_gift": 1,
        "is_points_discount": 1,
        "is_alone_points_discount": 0,
        "points_discount_config": "",
        "is_enable_grade": 1,
        "is_alone_grade": 0,
        "alone_grade_equity": [],
        "status": 10,
        "is_ind_dealer": 0,
        "dealer_money_type": 10,
        "first_money": "0.00",
        "second_money": "0.00",
        "third_money": "0.00",
        "goods_images": [{
          "file_id": 10364,
          "file_type": 10,
          "preview_url": "2a6e0c0ea7d1e5f0f2ac3e406198850c.jpg",
          "external_url": "2a6e0c0ea7d1e5f0f2ac3e406198850c.jpg"
        }],
        "goods_image": "2a6e0c0ea7d1e5f0f2ac3e406198850c.jpg",
        "goods_sales": 203,
        "is_user_grade": true,
        "skuInfo": {
          "id": 10525,
          "goods_sku_id": "0",
          "goods_id": 10019,
          "image_id": 0,
          "goods_sku_no": "",
          "goods_price": "32.14",
          "line_price": "0.00",
          "stock_num": 83,
          "goods_weight": 0,
          "goods_props": null,
          "spec_value_ids": null,
          "store_id": 10001,
          "create_time": "2022-01-07 16:03:06",
          "update_time": "2022-01-19 10:18:12"
        }
      }
    }, {
      "id": 29,
      "goods_id": 10020,
      "goods_sku_id": "10052",
      "goods_num": 1,
      "user_id": 10125,
      "goods": {
        "goods_id": 10020,
        "goods_name": "耐克 男子 NIKE AIR FORCE 1'07 运动鞋",
        "goods_no": "",
        "video_id": 0,
        "video_cover_id": 0,
        "selling_point": "",
        "spec_type": 20,
        "goods_price_min": "575.28",
        "goods_price_max": "575.28",
        "line_price_min": "999.00",
        "line_price_max": "999.00",
        "stock_total": 6969,
        "delivery_id": 10001,
        "is_points_gift": 1,
        "is_points_discount": 1,
        "is_alone_points_discount": 0,
        "points_discount_config": "",
        "is_enable_grade": 1,
        "is_alone_grade": 0,
        "alone_grade_equity": [],
        "status": 10,
        "is_ind_dealer": 0,
        "dealer_money_type": 10,
        "first_money": "0.00",
        "second_money": "0.00",
        "third_money": "0.00",
        "goods_images": [{
          "file_id": 10378,
          "file_type": 10,
          "preview_url": "b72822760ccc4bb892cc658b33af939e.jpg",
          "external_url": "b72822760ccc4bb892cc658b33af939e.jpg"
        }, {
          "file_id": 10381,
          "file_type": 10,
          "preview_url": "e8f48e56ccd8dc60c883fc8fe06d6149.png",
          "external_url": "e8f48e56ccd8dc60c883fc8fe06d6149.png"
        }, {
          "file_id": 10377,
          "file_type": 10,
          "preview_url": "b3393458e9a9bd2459303e501958f0a3.jpg",
          "external_url": "b3393458e9a9bd2459303e501958f0a3.jpg"
        }, {
          "file_id": 10379,
          "file_type": 10,
          "preview_url": "c264491617b6817b9433fed7442322ea.jpg",
          "external_url": "c264491617b6817b9433fed7442322ea.jpg"
        }, {
          "file_id": 10380,
          "file_type": 10,
          "preview_url": "5136ccd3118b1b8733a4fe472e6f9716.jpg",
          "external_url": "5136ccd3118b1b8733a4fe472e6f9716.jpg"
        }],
        "goods_image": "b72822760ccc4bb892cc658b33af939e.jpg",
        "goods_sales": 40,
        "is_user_grade": true,
        "skuInfo": {
          "id": 10451,
          "goods_sku_id": "10052",
          "goods_id": 10020,
          "image_id": 10381,
          "goods_sku_no": "5",
          "goods_price": "587.02",
          "line_price": "999.00",
          "stock_num": 993,
          "goods_weight": 4,
          "goods_props": [{
            "group": {
              "name": "尺码",
              "id": 10007
            },
            "value": {
              "name": "39",
              "id": 10052
            }
          }],
          "spec_value_ids": [10052],
          "store_id": 10001,
          "create_time": "2021-11-20 18:39:03",
          "update_time": "2022-02-15 23:23:59"
        }
      }
    }]
  }
}
返回参数
参数名 类型 示例值 说明
status int 200 请求状态(200:请求成功;500:请求错误/失败)
message string success 请求结果的信息,默认为 success
data object - 返回的业务数据
data 参数
参数名 类型 示例值 说明
cartTotal int 2 商品总数量
list array - 商品列表