打水机-机主-设备列表
打水机-机主-设备列表
请求路由:
route= plugin.yz-supply-water-machine.frontend.business.device.statistics
请求参数说明:
| 参数名 | 类型 | 是否必需 | 说明 |
|---|---|---|---|
| search | string | 否 | 设备号/设备地址 |
| page | int | 是 | 分页 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "ok",
"data": {
"total_device_count": 4,
"online_device_count": 1,
"offline_device_count": 1,
"statistics_date": "2026-03-12",
"statistics_month": "2026-03",
"list": {
"current_page": 1,
"data": [
{
"id": 8,
"name": "测试", //设备名称
"device_no": "863434084696407", //设备号
"address": "",
"water_level": 2,//3是满其他都是未满
"device_status": "0", //设备状态 在线状态(在线0/离线1)
"water_status": "",
"month_amount": "50.00", //月销售额
"today_amount": "0.00", // 日销售额
},
{
"id": 7,
"name": "测试",
"device_no": "868909070678217",
"address": "",
"device_status": "1",
"water_status": "",
"month_amount": "0.00",
"today_amount": "0.00",
"month_amount_cent": 0,
"today_amount_cent": 0
},
{
"id": 1,
"name": "\"测试修改\"",
"device_no": "868909070679587",
"address": "测试地址",
"device_status": null,
"water_status": "",
"month_amount": "0.00",
"today_amount": "0.00",
"month_amount_cent": 0,
"today_amount_cent": 0
},
{
"id": 6,
"name": "\"测试修改\"",
"device_no": "120153153",
"address": "131321",
"device_status": null,
"water_status": "",
"month_amount": "0.00",
"today_amount": "0.00",
"month_amount_cent": 0,
"today_amount_cent": 0
}
],
"first_page_url": "http://shop/addons/yun_shop/api.php?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://shop/addons/yun_shop/api.php?page=1",
"links": [
{
"url": null,
"label": "« 上一页",
"active": false
},
{
"url": "http://shop/addons/yun_shop/api.php?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "下一页 »",
"active": false
}
],
"next_page_url": null,
"path": "http://shop/addons/yun_shop/api.php",
"per_page": 15,
"prev_page_url": null,
"to": 4,
"total": 4
}
}
}