文档
测试

加入清单

POST
/cart/addCartProduct

接口描述

在商品处点击‘加入清单’,添加商品到购物车并显示数据到购物车

请求头

参数名
类型
描述
必填
token
String
必填

请求参数

参数名
类型
描述
必填
goodsId
Long
商品编号(主键,后台默认不能为空)
必填

响应参数

参数名
类型
描述
必填
code
int
必填
msg
String
必填
data
必填

说明 / 示例

``` 成功后返回数据情况 { "code": 1000, "msg": "操作成功", "data": { "cartProductDtoList": [ { "quantity": 2, "goodsId": 216465, "smallImgPath": null, "currentPrice": 2000, "goodsName": "抱枕", "publishStatus": 1, "reserve": 5, "productTotalPrice": 4000, "productSelected": true }, { "quantity": 1, "goodsId": 32132, "smallImgPath": null, "currentPrice": 4000, "goodsName": "智能机器人", "publishStatus": 1, "reserve": 8, "productTotalPrice": 4000, "productSelected": true } ], "selectedAll": true, "cartTotalPrice": 8000, "cartTotalQuantity": 3 } } ``` |quantity|goodsId|smallImgPath|currentPrice|goodsName|publishStatus|reserve|productTotalPrice|productSelected|selectedAll|cartTotalPrice|cartTotalQuantity| |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-| |商品数量|商品Id|商品小图路径|商品单价|商品名称|上架状态:0->下架;1->上架|页面显示库存|商品总价|是否有选中(后面功能会有用到)|全选功能(后面功能会用到)|购物车商品总价|所有商品总数量|