简要描述:
初进商品统计页面获取所有统计数据
请求URL:
GET/plugin.shop-statistics.backend.goods.get-goods-statistic
返回示例:
正确时返回:
{
"result": 1,
"msg": "ok",
"data": {
"cumulative_data": {
"goods_count": 82,
"pay_goods_count": "448",
"order_goods_count": "574"
},
"goods_statistic": [
{
"name": "商品加购件数",
"tips": "统计筛选时间内,商品加入购物车的件数总和",
"value": 0,
"x_axis": [
"07/16",
"07/17",
"07/18",
"07/19",
"07/20",
"07/21",
"07/22"
],
"y_axis": [
0,
0,
0,
0,
0,
0,
0
]
},
{
"name": "商品成交件数",
"tips": "统计筛选时间内,支付成功的商品件数总和",
"value": 0,
"x_axis": [
"07/16",
"07/17",
"07/18",
"07/19",
"07/20",
"07/21",
"07/22"
],
"y_axis": [
0,
0,
0,
0,
0,
0,
0
]
},
{
"name": "动销商品数",
"tips": "统计筛选时间内,销量不为0的商品数量",
"value": 0,
"x_axis": [
"07/16",
"07/17",
"07/18",
"07/19",
"07/20",
"07/21",
"07/22"
],
"y_axis": [
0,
0,
0,
0,
0,
0,
0
]
}
],
"goods_sales_amount": {
"current_page": 2,
"data": [
{
"goods_id": 10,
"title": "叙旧通勤百搭两色休闲西装裤九分裤2018秋款/烟火尘埃/K4442",
"goods_price_total": "1364.00"
},
{
"goods_id": 4,
"title": "卫目天下电子喷雾仪",
"goods_price_total": "1298.00"
},
{
"goods_id": 16,
"title": "测试供应商",
"goods_price_total": "936.00"
},
{
"goods_id": 13,
"title": "微店2",
"goods_price_total": "870.00"
},
{
"goods_id": 17,
"title": "供应商",
"goods_price_total": "756.00"
},
{
"goods_id": 110,
"title": "代购Nike SF Air Force 1黑黄新欢 日本限定警戒线空军高帮男板鞋",
"goods_price_total": "750.00"
},
{
"goods_id": 9,
"title": "测试商品2",
"goods_price_total": "590.00"
},
{
"goods_id": 18,
"title": "易一武",
"goods_price_total": "590.00"
},
{
"goods_id": 15,
"title": "招商等级",
"goods_price_total": "550.00"
},
{
"goods_id": 108,
"title": "(爱心值积分余额)商务拉杆箱前置电脑包行李箱PC旅行箱男女拉链铝框硬壳箱密码硬箱",
"goods_price_total": "480.00"
}
],
"first_page_url": "http://yzmall.com/admin/shop?page=1",
"from": 11,
"last_page": 5,
"last_page_url": "http://yzmall.com/admin/shop?page=5",
"next_page_url": "http://yzmall.com/admin/shop?page=3",
"path": "http://yzmall.com/admin/shop",
"per_page": 10,
"prev_page_url": "http://yzmall.com/admin/shop?page=1",
"to": 20,
"total": 43
},
"goods_sales": {
"current_page": 2,
"data": [
{
"title": "测试3",
"real_sales": 17
},
{
"title": "微店1",
"real_sales": 13
},
{
"title": "租赁",
"real_sales": 12
},
{
"title": "叙旧通勤百搭两色休闲西装裤九分裤2018秋款/烟火尘埃/K4442",
"real_sales": 12
},
{
"title": "微店1",
"real_sales": 11
},
{
"title": "丽唧唧精品酒店",
"real_sales": 10
},
{
"title": "微店2",
"real_sales": 10
},
{
"title": "招商",
"real_sales": 9
},
{
"title": "测试1",
"real_sales": 8
},
{
"title": "测试供应商",
"real_sales": 7
}
],
"first_page_url": "http://yzmall.com/admin/shop?page=1",
"from": 11,
"last_page": 18,
"last_page_url": "http://yzmall.com/admin/shop?page=18",
"next_page_url": "http://yzmall.com/admin/shop?page=3",
"path": "http://yzmall.com/admin/shop",
"per_page": 10,
"prev_page_url": "http://yzmall.com/admin/shop?page=1",
"to": 20,
"total": 178
},
"category_goods_sales": {
"current_page": 1,
"data": [
{
"id": 1,
"name": "1",
"sales": 13869
},
{
"id": 3,
"name": "女装",
"sales": 26
},
{
"id": 5,
"name": "1",
"sales": 21
},
{
"id": 9,
"name": "五星级",
"sales": 10
},
{
"id": 11,
"name": "1",
"sales": 6
},
{
"id": 18,
"name": "22",
"sales": 3
},
{
"id": 13,
"name": "测试1",
"sales": 1
},
{
"id": 15,
"name": "test1",
"sales": 1
},
{
"id": 7,
"name": "手环",
"sales": 0
},
{
"id": 20,
"name": "1231",
"sales": 0
}
],
"from": 1,
"last_page": 2,
"per_page": 10,
"total": 16
}
}
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
cumulative_data | array | 累计数据 |
cumulative_data.goods_count | int | 在架商品数 |
cumulative_data.pay_goods_count | int | 累计商品成交件数 |
cumulative_data.order_goods_count | int | 累计商品下单件数 |
goods_statistic | array | 商品统计图数据 |
goods_statistic.name | string | 统计数据类型名字 |
goods_statistic.tips | string | 统计数据类型提示 |
goods_statistic.value | int/float | 该类型在搜索时间内的值 |
goods_statistic.x_axis | array | 该统计数据类型x轴数据 |
goods_statistic.y_axis | array | 该统计数据类型y轴数据 |
goods_sales_amount | array | 商品销售金额排名数据 |
goods_sales_amount.goods_id | int | 商品id |
goods_sales_amount.title | string | 商品名 |
goods_sales_amount.goods_price_total | float | 商品销售金额 |
goods_salest | array | 商品销量排名数据 |
goods_sales.goods_id | int | 商品id |
goods_sales.title | string | 商品名 |
goods_sales.real_sales | float | 商品销量 |
category_goods_sales | array | 分类销量排名数据 |
category_goods_sales.id | int | 分类id |
category_goods_sales.name | string | 分类名 |
category_goods_sales.sales | int | 分类销量 |