文档
测试

加入购物车

POST
add_cart

请求参数

参数名
类型
描述
必填
goods_id
string
商品id,示例:528
必填
stock
int
数量,示例:1
必填
spec
array
规格数据,数据列表
必填
id
string
示例:9025
必填
type
string
示例:规格名
必填
value
string
示例:气垫亮白色*1
必填
images
string
示例:https://api.miaopinhui.net/static/upload/images/other/2021/02/03/1612320252821249.jpg
必填
stock
int
示例:0
必填
price
string
示例:109.80
必填
original_price
string
示例:328.00
必填
title
string
示例:桃丽丝凝润柔光气垫修颜霜
必填
address_id
string
地址id,示例:12685
必填

响应参数

参数名
类型
描述
必填
msg
string
示例:加入成功
必填
code
int
示例:0
必填
data
int
示例:4
必填

说明 / 示例

请求示例 ```json { "goods_id": "528", "stock": 1, "spec": [ { "id": "9025", "type": "规格名", "value": "气垫亮白色*1", "images": "https://api.miaopinhui.net/static/upload/images/other/2021/02/03/1612320252821249.jpg", "stock": 0, "price": "109.80", "original_price": "328.00", "title": "桃丽丝凝润柔光气垫修颜霜" } ], "address_id": "12685" } ``` 返回示例 ```json { "msg": "加入成功", "code": 0, "data": 4 } ```