简要描述:
- 获取项目列表
请求URL:
GET/plugin.store-projects.frontend.project.get-list
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
category_id | 否 | string | 分类ID |
lng | 是 | float | 经度 |
lat | 是 | float | 纬度 |
name | 否 | string | 项目名称 |
page | 否 | int | 页码 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"current_page": 1,
"data": [
{
"id": 2,
"store_ids": "9,10",
"title": "测试项目2",
"thumb": "https://localhost:82/attachment/images/2/2019/08/fv8mhb830HBd8d803zduMqSSHS88qu.png",
"period": 100,
"description": "项目简介\n项目简介",
"category_name": "测试分类1",
"total_sell_count": 0,
"store_count": 2,
"store_distance": 1010.2,
"store_distance_unit": "km"
}
],
"first_page_url": "http://localhost:82/addons/yun_shop/api.php?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://localhost:82/addons/yun_shop/api.php?page=1",
"next_page_url": null,
"path": "http://localhost:82/addons/yun_shop/api.php",
"per_page": 10,
"prev_page_url": null,
"to": 2,
"total": 2
}
}
错误时返回:
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
id | int | 项目ID |
title | string | 项目名称 |
thumb | string | 缩略图 |
period | string | 期限 |
description | string | 简介 |
category_name | string | 分类名 |
total_sell_count | int | 累计销售数量 |
store_count | int | 门店数量 |
store_distance | float | 最近门店距离 |
store_distance_unit | string | 最近门店距离单位 |
备注:
- 更多返回错误代码请看首页的错误代码描述