GET代码目录
/tool/open_api/api/goods/basic-detail
请求Params
请求 Header
响应定义
请求参数
Query参数
Header参数
数据结构
export interface Response {
code: number;
data: Data;
msg: string;
}
export interface Data {
/**
* 商品详情,基础版
*/
goods: Goods;
}
/**
* 商品详情,基础版
*/
export interface Goods {
/**
* 成本价
*/
costPrice: string;
/**
* 封面图
*/
coverPic: string;
/**
* 创建时间
*/
createdAt: string;
/**
* 浏览量
*/
detailCount: number;
/**
* 库存
*/
goodsStock: number;
/**
* 商品id
*/
id: number;
/**
* 关键词
*/
keyword: string;
/**
* 名称
*/
name: string;
/**
* 原价
*/
originalPrice: string;
/**
* 商品图片
*/
picurl: Picurl[];
/**
* 售价
*/
price: string;
/**
* 按升序排序,值越大越靠后
*/
sort: number;
/**
* 商品状态
*/
status: number;
/**
* 副标题
*/
subtitle: string;
/**
* 商品类型
*/
type: Type;
/**
* 单位
*/
unit: string;
/**
* 是否启用规格
*/
useAttr: number;
/**
* 视频地址
*/
videourl: string;
}
export interface Picurl {
/**
* 图片链接
*/
picurl: string;
}
/**
* 商品类型
*/
export type Type = "goods" | "ecard" | "form-goods";
示例代码
{
"msg": "string",
"data": {
"goods": {
"id": 0,
"name": "string",
"subtitle": "string",
"keyword": "string",
"status": 0,
"created_at": "string",
"type": "goods",
"original_price": "string",
"cost_price": "string",
"cover_pic": "string",
"pic_url": [
{
"pic_url": "string"
}
],
"video_url": "string",
"unit": "string",
"goods_stock": 0,
"price": "string",
"use_attr": 0,
"sort": 0,
"detail_count": 0
}
},
"code": 0
}