搜索
请求路由url
/api/search/index
请求方式
get
get请求参数
参数 | 说明 | 类型 | 是否必要 |
---|---|---|---|
word | 搜索关键词 | string | 是 |
token | 登录返回的凭证 | string | 否,如果已登录 需要带上该参数 |
type | 搜索类别 | int | 否,默认是0表示全部搜索,1搜商品,2搜索任务 |
page | 页码 | int | 否,默认是1 |
limit | 每页数量 | int | 否,默认是10 |
请求结果
{
"code": 1,//
"msg": "ok",
"time": "1642468567",
"data": {
"list": [//结果列表
{
"goods_id": 21,//商品id
"goods_name": "小米Mix3",//商品名
"short_desc": "",商品描述
"store_id": 0,
"category_id": 5,
"spec_type": "20",
"deduct_stock_type": "20",
"sales_initial": 20,
"sales_actual": 4,
"goods_sort": 21,
"delivery_id": 22,
"goods_status": "10",
"is_delete": "0",
"createtime": "2018-11-05",
"image": "https://her-family.oss-cn-qingdao.aliyuncs.com/addons_store_uploads/20181105/ffc4440df18661948b9c2d4dd4ae419b.jpg",
"goods_spec_id": 81,//规格id
"goods_no": "SN001",
"goods_price": 3299,//销售价格
"line_price": 0,//划线价格
"stock_num": 997,
"spec_sku_id": "40_42",//属性id
"search_type": 1,//1表示商品类型
"goods_sales": 24
},
{
"id": 1,//如果是悬赏类型,则为任务id,如果是普通任务则为任务领取记录id
"task_id":1//如果是普通任务,则该值表示的是任务id
"name": "小米",//任务名
"createtime": 0,
"describe": "赠送华为手机",//任务描述
"owner_type": 2,//2悬赏 1普通任务
"tag_ids": "1",
"limit_draw_num": 0,
"search_type": "2",//2表示任务类型
"status_id": -2,
"status": "已领完",
"color": "#DB312A",
"tag_text": "产品"//标签名
}
],
"total": 2,//结果总数
}
}