获取-商品详情-库存
GET
/goods/stock/{id}获取商品详情库存 (支持本地购物车)
请求参数
Path 参数
id
string
skuID
示例值:
300248016
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
string
业务状态码
1成功, 其他失败
msg
string
响应消息
result
object
响应结果
nowPrice
integer
商品最新价格
oldPrice
null
商品原始价格
stock
integer
商品库存数
discount
null
商品折扣
isEffective
boolean
商品是否有效
示例成功示例
{
"code": "1",
"msg": "操作成功",
"result": {
"nowPrice": 199,
"oldPrice": null,
"stock": 4912,
"discount": null,
"isEffective": true
}
}
最后修改时间: 2 年前