[ { "type": "get", "url": "/", "title": "获取首页信息", "version": "1.0.0", "name": "getIndex", "group": "Common", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "
基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "farm", "description": "农场基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "farm.name", "description": "农场名
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "gateway", "description": "网关信息(环境监测)
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "gateway.name", "description": "网关名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "gateway.id", "description": "网关ID
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"farm\": {\"info\": \"\", \"master_name\": \"\", \"tel\": \"\", \"name\": \"\\u9ed8\\u8ba4\\u56ed\\u533a\", \"pic\": \"\", \"cdate\": 1503915445, \"state\": true, \"address\": \"\", \"id\": 1}, \"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"msg\": 0, \"gateway\": [{\"status\": false, \"hardware_id\": 3213, \"name\": \"323\", \"farm_id\": 2, \"cdate\": 1504075691, \"state\": true, \"power_num\": null, \"power_status\": false, \"id\": \"d53db924-2043-500f-8140-b24780bb4691\"}, {\"status\": false, \"hardware_id\": 10086, \"name\": \"\\u9ed8\\u8ba4\\u7f51\\u5173\", \"farm_id\": 1, \"cdate\": 1503915445, \"state\": true, \"power_num\": null, \"power_status\": false, \"id\": \"5828ba1d-10de-5ebc-988d-345bc5ad40a8\"}]}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/main.py", "groupTitle": "Common" }, { "type": "post", "url": "/upload", "title": "上传图片", "version": "1.0.0", "name": "upload", "group": "Common", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "file", "description": "文件流名称
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Bool", "optional": false, "field": "status", "description": "状态
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg", "description": "描述
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "code", "description": "状态码
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "data", "description": "返回数据
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "data.src", "description": "图片地址
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"操作成功\", \"code\": 0, \"data\": {\"src\":\"url\"}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/upload.py", "groupTitle": "Common" }, { "type": "get", "url": "/device", "title": "获取网关首页信息", "version": "1.0.0", "name": "getDevice", "group": "Device", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "网关id
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "info", "description": "网关状态基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.id", "description": "网关ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.name", "description": "网关名称
" }, { "group": "Success 200", "type": "Bool", "optional": false, "field": "info.status", "description": "网关状态
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "info.power", "description": "电量
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "device", "description": "设备数据
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "device.id", "description": "设备ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "device.name", "description": "设备名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "device.show", "description": "显示的数据
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "device.unit", "description": "设备的单位
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "device.max", "description": "设备的上限
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "device.min", "description": "设备的下限
" }, { "group": "Success 200", "type": "Bool", "optional": false, "field": "device.status", "description": "设备状态
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "pic", "description": "图像数据
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "pic.id", "description": "图片ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.name", "description": "图片名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.show", "description": "图片地址
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.cdates", "description": "采集时间
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.cdate", "description": "采集时间戳
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"info\": {\"status\": true, \"hardware_id\": 10086, \"name\": \"\\u9ed8\\u8ba4\\u7f51\\u5173\", \"farm_id\": 1, \"cdate\": 1504233947, \"state\": true, \"power_num\": \"\", \"power_status\": \"\", \"id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\"}, \"device\": [{\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100009, \"name\": \"\\u6e7f\\u5ea6#100009\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253837, \"state\": true, \"num\": 30, \"status\": true, \"min\": 0, \"show\": \"30\", \"id\": \"6d8a4c0e-4f85-524a-87f8-382c333c44da\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100000, \"name\": \"\\u6e7f\\u5ea6#100000\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253836, \"state\": true, \"num\": 5, \"status\": true, \"min\": 0, \"show\": \"5\", \"id\": \"d644b079-9d4d-521c-8e65-8940c96ba9a7\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100001, \"name\": \"\\u6e7f\\u5ea6#100001\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253835, \"state\": true, \"num\": 4, \"status\": true, \"min\": 0, \"show\": \"4\", \"id\": \"dc24428c-eafc-5715-b7d1-f3222d28c3bb\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100004, \"name\": \"\\u6e7f\\u5ea6#100004\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253834, \"state\": true, \"num\": 17, \"status\": true, \"min\": 0, \"show\": \"17\", \"id\": \"62199416-cca0-5114-b900-a10f51e7e447\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100005, \"name\": \"\\u6e7f\\u5ea6#100005\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253833, \"state\": true, \"num\": 7, \"status\": true, \"min\": 0, \"show\": \"7\", \"id\": \"456daa98-a1f0-59e6-a337-7ca1fa7b2527\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100003, \"name\": \"\\u6e7f\\u5ea6#100003\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253832, \"state\": true, \"num\": 39, \"status\": true, \"min\": 0, \"show\": \"39\", \"id\": \"11bd4ad1-b4ff-5b1f-948a-935d859b408c\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100007, \"name\": \"\\u6e7f\\u5ea6#100007\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253828, \"state\": true, \"num\": 43, \"status\": true, \"min\": 0, \"show\": \"43\", \"id\": \"f8e3a42a-7fa3-575a-b99e-2dab4f992239\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100010, \"name\": \"\\u6e7f\\u5ea6#100010\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253827, \"state\": true, \"num\": 20, \"status\": true, \"min\": 0, \"show\": \"20\", \"id\": \"138876d7-1710-56fa-824b-10402cba17f8\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100002, \"name\": \"\\u6e7f\\u5ea6#100002\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253826, \"state\": true, \"num\": 43, \"status\": true, \"min\": 0, \"show\": \"43\", \"id\": \"eecfe61f-de83-588f-8cbd-41519d4ebef3\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100006, \"name\": \"\\u6e7f\\u5ea6#100006\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253818, \"state\": true, \"num\": 4, \"status\": true, \"min\": 0, \"show\": \"4\", \"id\": \"78bd90ac-6af3-5091-83e5-f3397063f743\", \"unit\": \"%RH\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100008, \"name\": \"\\u6e7f\\u5ea6#100008\", \"type_id\": 2, \"max\": 0, \"farm_id\": 1, \"cdate\": 1504253815, \"state\": true, \"num\": 37, \"status\": true, \"min\": 0, \"show\": \"37\", \"id\": \"5fda8633-aed8-5a3b-8175-2c61e7553d91\", \"unit\": \"%RH\"}], \"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"pic\": [{\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 5, \"hardware_id\": 200001, \"name\": \"pic.jpg\", \"type_id\": null, \"farm_id\": 1, \"cdate\": 1504262668, \"cdates\": \"2017-09-01 10:44:28\", \"state\": true, \"num\": 0, \"status\": true, \"show\": \"/camera/2017/09/01/01c323ac0208580601252e2ce9eb3286.jpg\", \"id\": \"2f612150-f670-54e9-9886-a044cfb18e20\"}]}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/device.py", "groupTitle": "Device" }, { "type": "get", "url": "/device/msg", "title": "获取设备日志", "version": "1.0.0", "name": "getDeviceMsg", "group": "Device", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "page", "description": "页数
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "网关id
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "device", "description": "设备id
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "msg", "description": "日志列表
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "msg.id", "description": "日志ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg.content", "description": "日志内容
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg.cdates", "description": "日志时间
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg.cdate", "description": "日志时间戳
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "page", "description": "分页信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.current", "description": "当前页
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.total", "description": "总页数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.num", "description": "每页数据条数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.totalNum", "description": "总数据条数
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"info\": {\"status\": true, \"hardware_id\": 10086, \"name\": \"\\u9ed8\\u8ba4\\u7f51\\u5173\", \"farm_id\": 1, \"cdate\": 1504233947, \"state\": true, \"power_num\": \"\", \"power_status\": \"\", \"id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\"}, \"msg\": [], \"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"cur_device\": {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": \"\", \"hardware_type\": 2, \"hardware_id\": 100001, \"name\": \"\\u6e7f\\u5ea6#100001\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253835, \"state\": true, \"num\": 4, \"status\": true, \"show\": \"4\", \"id\": \"dc24428c-eafc-5715-b7d1-f3222d28c3bb\"}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/device.py", "groupTitle": "Device" }, { "type": "get", "url": "/device/pic", "title": "获取图像记录", "version": "1.0.0", "name": "getDevicePic", "group": "Device", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "page", "description": "页数
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "网关id
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "search_date", "description": "拍照时间:2017-10-10
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "info", "description": "网关状态基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.id", "description": "网关ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.name", "description": "网关名称
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "pic", "description": "图像数据
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "pic.id", "description": "图片ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.name", "description": "图片名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.show", "description": "图片地址
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.cdates", "description": "采集时间
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "pic.cdate", "description": "采集时间戳
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "search", "description": "当前搜索的值
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "search.date", "description": "拍照时间
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "url", "description": "网站url
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "page", "description": "分页信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.current", "description": "当前页
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.total", "description": "总页数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.num", "description": "每页数据条数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.totalNum", "description": "总数据条数
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"info\": {\"status\": true, \"hardware_id\": 10086, \"name\": \"\\u9ed8\\u8ba4\\u7f51\\u5173\", \"farm_id\": 1, \"cdate\": 1504233947, \"state\": true, \"power_num\": \"\", \"power_status\": \"\", \"id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\"}, \"url\": \"http://192.168.15.10:8088/\", \"pic\": [{\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"pic\": \"/camera/2017/09/01/01c323ac0208580601252e2ce9eb3286.jpg\", \"farm_id\": 1, \"cdate\": 1504262668, \"cdates\": \"2017-09-01 10:44:28\", \"state\": true, \"id\": \"5ea5d688-e092-5131-a382-686298da4f94\", \"device_id\": \"2f612150-f670-54e9-9886-a044cfb18e20\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"pic\": \"/camera/2017/09/01/f5e1509cf0d6b1cb2f048a058dabd75b.jpg\", \"farm_id\": 1, \"cdate\": 1504262666, \"cdates\": \"2017-09-01 10:44:26\", \"state\": true, \"id\": \"bd36fa61-5210-57c5-b8b8-a81e5797ee85\", \"device_id\": \"2f612150-f670-54e9-9886-a044cfb18e20\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"pic\": \"/camera/2017/09/01/8f3a6d9d614cd280d2cb4a78f90d121a.jpg\", \"farm_id\": 1, \"cdate\": 1504262665, \"cdates\": \"2017-09-01 10:44:25\", \"state\": true, \"id\": \"162ac864-b2e9-5a7a-84cb-ac57e31ef99c\", \"device_id\": \"2f612150-f670-54e9-9886-a044cfb18e20\"}], \"search_date\": null, \"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"page\": {\"current\": 1, \"ajax\": false, \"total\": 1.0, \"num\": 15, \"totalNum\": 3}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/device.py", "groupTitle": "Device" }, { "type": "get", "url": "/device/set", "title": "获取设备极限值信息", "version": "1.0.0", "name": "getDeviceSet", "group": "Device", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "网关id
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "device", "description": "设备id
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "device", "description": "设备数据
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "device.id", "description": "设备ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "device.name", "description": "设备名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "device.show", "description": "显示的数据
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "device.unit", "description": "设备的单位
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "device.max", "description": "设备的上限
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "device.min", "description": "设备的下限
" }, { "group": "Success 200", "type": "Bool", "optional": false, "field": "device.status", "description": "设备状态
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": [{\"pic\": \"http://192.168.15.10:8087/upload/2017/08/30/455f9d6c26b5c989b32eda1809e58d5f.jpg\", \"method_id\": null, \"land_id\": \"249be20d-5759-5af0-9859-b770d9f44e2a\", \"farm_id\": 1, \"state\": true, \"amount\": \"100ml\", \"workdate\": 1504105397, \"category_id\": \"9365ea66-be55-56f7-a511-059fc85a9478\", \"cdate\": 1504076614, \"id\": \"19e05f00-ae55-5605-be12-86dcd2866df9\"}], \"page\": {\"current\": 1, \"ajax\": false, \"total\": 1.0, \"num\": 15, \"totalNum\": 1}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/device.py", "groupTitle": "Device" }, { "type": "get", "url": "/device/stat", "title": "获取数据统计", "version": "1.0.0", "name": "getDeviceStat", "group": "Device", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "网关id
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "device", "description": "设备id
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "search_group", "description": "周期ID
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "search_start", "description": "开始时间:2017-10-10 10:10:10
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "search_end", "description": "结束时间:2017-10-10 10:10:10
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "info", "description": "网关状态基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.id", "description": "网关ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.name", "description": "网关名称
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "data", "description": "设备选择
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "data.id", "description": "设备ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "data.name", "description": "设备名称
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "group", "description": "周期选择
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "group.id", "description": "周期ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "group.name", "description": "周期名称
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "cur_device", "description": "当前选择的设备
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "cur_device.id", "description": "设备ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "cur_device.name", "description": "设备名称
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "data.data", "description": "本条数据的具体数据
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "data.data.time", "description": "数据时间
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "data.data.value", "description": "数据具体的值
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "search", "description": "当前搜索的值
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "search.group", "description": "周期的值
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "search.start", "description": "开始时间
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "search.end", "description": "结束时间
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"info\": {\"status\": true, \"hardware_id\": 10086, \"name\": \"\\u9ed8\\u8ba4\\u7f51\\u5173\", \"farm_id\": 1, \"cdate\": 1504233947, \"state\": true, \"power_num\": \"\", \"power_status\": \"\", \"id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\"}, \"search\": {\"group\": \"1\"}, \"group\": [{\"id\": \"1\", \"name\": \"\\u4e00\\u5929\"}, {\"id\": \"7\", \"name\": \"\\u4e00\\u5468\"}, {\"id\": \"30\", \"name\": \"\\u4e00\\u4e2a\\u6708\"}, {\"id\": \"180\", \"name\": \"\\u534a\\u5e74\"}], \"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"cur_device\": {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": \"\", \"hardware_type\": 2, \"hardware_id\": 100001, \"name\": \"\\u6e7f\\u5ea6#100001\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253835, \"state\": true, \"num\": 4, \"status\": true, \"show\": \"4\", \"id\": \"dc24428c-eafc-5715-b7d1-f3222d28c3bb\"}, \"device\": [{\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100009, \"name\": \"\\u6e7f\\u5ea6#100009\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253837, \"state\": true, \"num\": 30, \"status\": true, \"show\": \"30\", \"id\": \"6d8a4c0e-4f85-524a-87f8-382c333c44da\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100000, \"name\": \"\\u6e7f\\u5ea6#100000\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253836, \"state\": true, \"num\": 5, \"status\": true, \"show\": \"5\", \"id\": \"d644b079-9d4d-521c-8e65-8940c96ba9a7\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100001, \"name\": \"\\u6e7f\\u5ea6#100001\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253835, \"state\": true, \"num\": 4, \"status\": true, \"show\": \"4\", \"id\": \"dc24428c-eafc-5715-b7d1-f3222d28c3bb\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100004, \"name\": \"\\u6e7f\\u5ea6#100004\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253834, \"state\": true, \"num\": 17, \"status\": true, \"show\": \"17\", \"id\": \"62199416-cca0-5114-b900-a10f51e7e447\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100005, \"name\": \"\\u6e7f\\u5ea6#100005\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253833, \"state\": true, \"num\": 7, \"status\": true, \"show\": \"7\", \"id\": \"456daa98-a1f0-59e6-a337-7ca1fa7b2527\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100003, \"name\": \"\\u6e7f\\u5ea6#100003\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253832, \"state\": true, \"num\": 39, \"status\": true, \"show\": \"39\", \"id\": \"11bd4ad1-b4ff-5b1f-948a-935d859b408c\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100007, \"name\": \"\\u6e7f\\u5ea6#100007\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253828, \"state\": true, \"num\": 43, \"status\": true, \"show\": \"43\", \"id\": \"f8e3a42a-7fa3-575a-b99e-2dab4f992239\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100010, \"name\": \"\\u6e7f\\u5ea6#100010\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253827, \"state\": true, \"num\": 20, \"status\": true, \"show\": \"20\", \"id\": \"138876d7-1710-56fa-824b-10402cba17f8\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100002, \"name\": \"\\u6e7f\\u5ea6#100002\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253826, \"state\": true, \"num\": 43, \"status\": true, \"show\": \"43\", \"id\": \"eecfe61f-de83-588f-8cbd-41519d4ebef3\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100006, \"name\": \"\\u6e7f\\u5ea6#100006\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253818, \"state\": true, \"num\": 4, \"status\": true, \"show\": \"4\", \"id\": \"78bd90ac-6af3-5091-83e5-f3397063f743\"}, {\"gateway_id\": \"ce37636b-3ce7-5de2-9160-0f3283f7d392\", \"hardware_station\": null, \"hardware_type\": 2, \"hardware_id\": 100008, \"name\": \"\\u6e7f\\u5ea6#100008\", \"type_id\": 2, \"farm_id\": 1, \"cdate\": 1504253815, \"state\": true, \"num\": 37, \"status\": true, \"show\": \"37\", \"id\": \"5fda8633-aed8-5a3b-8175-2c61e7553d91\"}], \"data\": [{\"data\": {\"rows\": [[\"2017-09-01 11:15:00\", 45], [\"2017-09-01 11:20:00\", 50], [\"2017-09-01 11:25:00\", 49], [\"2017-09-01 11:30:00\", 49], [\"2017-09-01 11:35:00\", 50], [\"2017-09-01 11:40:00\", 48], [\"2017-09-01 11:45:00\", 49], [\"2017-09-01 11:50:00\", 47], [\"2017-09-01 11:55:00\", 49], [\"2017-09-01 12:00:00\", 49], [\"2017-09-01 12:05:00\", 47], [\"2017-09-01 12:10:00\", 50], [\"2017-09-01 12:15:00\", 49], [\"2017-09-01 12:20:00\", 50], [\"2017-09-01 12:25:00\", 48], [\"2017-09-01 12:30:00\", 50], [\"2017-09-01 12:35:00\", 48], [\"2017-09-01 12:40:00\", 50], [\"2017-09-01 12:45:00\", 47], [\"2017-09-01 12:50:00\", 50], [\"2017-09-01 12:55:00\", 49], [\"2017-09-01 13:00:00\", 46], [\"2017-09-01 13:05:00\", 50], [\"2017-09-01 13:10:00\", 50], [\"2017-09-01 13:15:00\", 49], [\"2017-09-01 13:20:00\", 50], [\"2017-09-01 13:25:00\", 49], [\"2017-09-01 13:30:00\", 50], [\"2017-09-01 13:35:00\", 50], [\"2017-09-01 13:40:00\", 48], [\"2017-09-01 13:45:00\", 49], [\"2017-09-01 13:50:00\", 49], [\"2017-09-01 13:55:00\", 49], [\"2017-09-01 14:00:00\", 49], [\"2017-09-01 14:05:00\", 47], [\"2017-09-01 14:10:00\", 49], [\"2017-09-01 14:15:00\", 48], [\"2017-09-01 14:20:00\", 45], [\"2017-09-01 14:25:00\", 50], [\"2017-09-01 14:30:00\", 50], [\"2017-09-01 14:35:00\", 49], [\"2017-09-01 14:40:00\", 49], [\"2017-09-01 14:45:00\", 49], [\"2017-09-01 14:50:00\", 49], [\"2017-09-01 14:55:00\", 47], [\"2017-09-01 15:00:00\", 49], [\"2017-09-01 15:05:00\", 50], [\"2017-09-01 15:10:00\", 49], [\"2017-09-01 15:15:00\", 47], [\"2017-09-01 15:25:00\", 50], [\"2017-09-01 15:30:00\", 50], [\"2017-09-01 15:35:00\", 49], [\"2017-09-01 15:40:00\", 49], [\"2017-09-01 15:45:00\", 49], [\"2017-09-01 15:50:00\", 48], [\"2017-09-01 15:55:00\", 47], [\"2017-09-01 16:05:00\", 46], [\"2017-09-01 16:10:00\", 49], [\"2017-09-01 16:15:00\", 49]], \"value\": \"[45, 50, 49, 49, 50, 48, 49, 47, 49, 49, 47, 50, 49, 50, 48, 50, 48, 50, 47, 50, 49, 46, 50, 50, 49, 50, 49, 50, 50, 48, 49, 49, 49, 49, 47, 49, 48, 45, 50, 50, 49, 49, 49, 49, 47, 49, 50, 49, 47, 50, 50, 49, 49, 49, 48, 47, 46, 49, 49]\", \"time\": \"[\\\"2017-09-01 11:15:00\\\", \\\"2017-09-01 11:20:00\\\", \\\"2017-09-01 11:25:00\\\", \\\"2017-09-01 11:30:00\\\", \\\"2017-09-01 11:35:00\\\", \\\"2017-09-01 11:40:00\\\", \\\"2017-09-01 11:45:00\\\", \\\"2017-09-01 11:50:00\\\", \\\"2017-09-01 11:55:00\\\", \\\"2017-09-01 12:00:00\\\", \\\"2017-09-01 12:05:00\\\", \\\"2017-09-01 12:10:00\\\", \\\"2017-09-01 12:15:00\\\", \\\"2017-09-01 12:20:00\\\", \\\"2017-09-01 12:25:00\\\", \\\"2017-09-01 12:30:00\\\", \\\"2017-09-01 12:35:00\\\", \\\"2017-09-01 12:40:00\\\", \\\"2017-09-01 12:45:00\\\", \\\"2017-09-01 12:50:00\\\", \\\"2017-09-01 12:55:00\\\", \\\"2017-09-01 13:00:00\\\", \\\"2017-09-01 13:05:00\\\", \\\"2017-09-01 13:10:00\\\", \\\"2017-09-01 13:15:00\\\", \\\"2017-09-01 13:20:00\\\", \\\"2017-09-01 13:25:00\\\", \\\"2017-09-01 13:30:00\\\", \\\"2017-09-01 13:35:00\\\", \\\"2017-09-01 13:40:00\\\", \\\"2017-09-01 13:45:00\\\", \\\"2017-09-01 13:50:00\\\", \\\"2017-09-01 13:55:00\\\", \\\"2017-09-01 14:00:00\\\", \\\"2017-09-01 14:05:00\\\", \\\"2017-09-01 14:10:00\\\", \\\"2017-09-01 14:15:00\\\", \\\"2017-09-01 14:20:00\\\", \\\"2017-09-01 14:25:00\\\", \\\"2017-09-01 14:30:00\\\", \\\"2017-09-01 14:35:00\\\", \\\"2017-09-01 14:40:00\\\", \\\"2017-09-01 14:45:00\\\", \\\"2017-09-01 14:50:00\\\", \\\"2017-09-01 14:55:00\\\", \\\"2017-09-01 15:00:00\\\", \\\"2017-09-01 15:05:00\\\", \\\"2017-09-01 15:10:00\\\", \\\"2017-09-01 15:15:00\\\", \\\"2017-09-01 15:25:00\\\", \\\"2017-09-01 15:30:00\\\", \\\"2017-09-01 15:35:00\\\", \\\"2017-09-01 15:40:00\\\", \\\"2017-09-01 15:45:00\\\", \\\"2017-09-01 15:50:00\\\", \\\"2017-09-01 15:55:00\\\", \\\"2017-09-01 16:05:00\\\", \\\"2017-09-01 16:10:00\\\", \\\"2017-09-01 16:15:00\\\"]\"}, \"name\": \"\\u6700\\u9ad8\"}, {\"data\": {\"rows\": [[\"2017-09-01 11:15:00\", 3], [\"2017-09-01 11:20:00\", 3], [\"2017-09-01 11:25:00\", 1], [\"2017-09-01 11:30:00\", 1], [\"2017-09-01 11:35:00\", 1], [\"2017-09-01 11:40:00\", 2], [\"2017-09-01 11:45:00\", 2], [\"2017-09-01 11:50:00\", 1], [\"2017-09-01 11:55:00\", 3], [\"2017-09-01 12:00:00\", 3], [\"2017-09-01 12:05:00\", 1], [\"2017-09-01 12:10:00\", 1], [\"2017-09-01 12:15:00\", 2], [\"2017-09-01 12:20:00\", 1], [\"2017-09-01 12:25:00\", 1], [\"2017-09-01 12:30:00\", 2], [\"2017-09-01 12:35:00\", 1], [\"2017-09-01 12:40:00\", 3], [\"2017-09-01 12:45:00\", 1], [\"2017-09-01 12:50:00\", 4], [\"2017-09-01 12:55:00\", 1], [\"2017-09-01 13:00:00\", 3], [\"2017-09-01 13:05:00\", 1], [\"2017-09-01 13:10:00\", 1], [\"2017-09-01 13:15:00\", 1], [\"2017-09-01 13:20:00\", 7], [\"2017-09-01 13:25:00\", 1], [\"2017-09-01 13:30:00\", 1], [\"2017-09-01 13:35:00\", 1], [\"2017-09-01 13:40:00\", 1], [\"2017-09-01 13:45:00\", 1], [\"2017-09-01 13:50:00\", 4], [\"2017-09-01 13:55:00\", 5], [\"2017-09-01 14:00:00\", 2], [\"2017-09-01 14:05:00\", 2], [\"2017-09-01 14:10:00\", 3], [\"2017-09-01 14:15:00\", 4], [\"2017-09-01 14:20:00\", 1], [\"2017-09-01 14:25:00\", 1], [\"2017-09-01 14:30:00\", 1], [\"2017-09-01 14:35:00\", 1], [\"2017-09-01 14:40:00\", 2], [\"2017-09-01 14:45:00\", 2], [\"2017-09-01 14:50:00\", 2], [\"2017-09-01 14:55:00\", 1], [\"2017-09-01 15:00:00\", 1], [\"2017-09-01 15:05:00\", 1], [\"2017-09-01 15:10:00\", 1], [\"2017-09-01 15:15:00\", 1], [\"2017-09-01 15:25:00\", 3], [\"2017-09-01 15:30:00\", 1], [\"2017-09-01 15:35:00\", 1], [\"2017-09-01 15:40:00\", 9], [\"2017-09-01 15:45:00\", 2], [\"2017-09-01 15:50:00\", 5], [\"2017-09-01 15:55:00\", 8], [\"2017-09-01 16:05:00\", 5], [\"2017-09-01 16:10:00\", 1], [\"2017-09-01 16:15:00\", 4]], \"value\": \"[3, 3, 1, 1, 1, 2, 2, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, 3, 1, 4, 1, 3, 1, 1, 1, 7, 1, 1, 1, 1, 1, 4, 5, 2, 2, 3, 4, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, 1, 1, 9, 2, 5, 8, 5, 1, 4]\", \"time\": \"[\\\"2017-09-01 11:15:00\\\", \\\"2017-09-01 11:20:00\\\", \\\"2017-09-01 11:25:00\\\", \\\"2017-09-01 11:30:00\\\", \\\"2017-09-01 11:35:00\\\", \\\"2017-09-01 11:40:00\\\", \\\"2017-09-01 11:45:00\\\", \\\"2017-09-01 11:50:00\\\", \\\"2017-09-01 11:55:00\\\", \\\"2017-09-01 12:00:00\\\", \\\"2017-09-01 12:05:00\\\", \\\"2017-09-01 12:10:00\\\", \\\"2017-09-01 12:15:00\\\", \\\"2017-09-01 12:20:00\\\", \\\"2017-09-01 12:25:00\\\", \\\"2017-09-01 12:30:00\\\", \\\"2017-09-01 12:35:00\\\", \\\"2017-09-01 12:40:00\\\", \\\"2017-09-01 12:45:00\\\", \\\"2017-09-01 12:50:00\\\", \\\"2017-09-01 12:55:00\\\", \\\"2017-09-01 13:00:00\\\", \\\"2017-09-01 13:05:00\\\", \\\"2017-09-01 13:10:00\\\", \\\"2017-09-01 13:15:00\\\", \\\"2017-09-01 13:20:00\\\", \\\"2017-09-01 13:25:00\\\", \\\"2017-09-01 13:30:00\\\", \\\"2017-09-01 13:35:00\\\", \\\"2017-09-01 13:40:00\\\", \\\"2017-09-01 13:45:00\\\", \\\"2017-09-01 13:50:00\\\", \\\"2017-09-01 13:55:00\\\", \\\"2017-09-01 14:00:00\\\", \\\"2017-09-01 14:05:00\\\", \\\"2017-09-01 14:10:00\\\", \\\"2017-09-01 14:15:00\\\", \\\"2017-09-01 14:20:00\\\", \\\"2017-09-01 14:25:00\\\", \\\"2017-09-01 14:30:00\\\", \\\"2017-09-01 14:35:00\\\", \\\"2017-09-01 14:40:00\\\", \\\"2017-09-01 14:45:00\\\", \\\"2017-09-01 14:50:00\\\", \\\"2017-09-01 14:55:00\\\", \\\"2017-09-01 15:00:00\\\", \\\"2017-09-01 15:05:00\\\", \\\"2017-09-01 15:10:00\\\", \\\"2017-09-01 15:15:00\\\", \\\"2017-09-01 15:25:00\\\", \\\"2017-09-01 15:30:00\\\", \\\"2017-09-01 15:35:00\\\", \\\"2017-09-01 15:40:00\\\", \\\"2017-09-01 15:45:00\\\", \\\"2017-09-01 15:50:00\\\", \\\"2017-09-01 15:55:00\\\", \\\"2017-09-01 16:05:00\\\", \\\"2017-09-01 16:10:00\\\", \\\"2017-09-01 16:15:00\\\"]\"}, \"name\": \"\\u6700\\u4f4e\"}]}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/device.py", "groupTitle": "Device" }, { "type": "get", "url": "/farm", "title": "获取农场基本信息", "version": "1.0.0", "name": "getFarm", "group": "Farm", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "farm", "description": "农场基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "farm.name", "description": "农场名
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "farm.master_name", "description": "联系人
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "farm.tel", "description": "联系电话
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "farm.address", "description": "农场地址
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"farm\": {\"info\": \"\", \"master_name\": \"\", \"tel\": \"\", \"name\": \"\\u9ed8\\u8ba4\\u56ed\\u533a\", \"pic\": \"\", \"cdate\": 1503915445, \"state\": true, \"address\": \"\", \"id\": 1}, \"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/farm.py", "groupTitle": "Farm" }, { "type": "get", "url": "/farm/msg", "title": "获取消息通知", "version": "1.0.0", "name": "getMsg", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "page", "description": "页数
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "list", "description": "消息列表
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "list.id", "description": "消息ID
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.content", "description": "消息内容
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.cdates", "description": "消息时间
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.cdate", "description": "消息时间戳
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "page", "description": "分页信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.current", "description": "当前页
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.total", "description": "总页数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.num", "description": "每页数据条数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.totalNum", "description": "总数据条数
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": []}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/farm.py", "groupTitle": "Farm" }, { "type": "get", "url": "/origin/info", "title": "获取溯源批次信息", "version": "1.0.0", "name": "getOrigin", "group": "Farm", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "info", "description": "溯源批次信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.name", "description": "名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.id", "description": "ID
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": [{\"pic\": \"http://192.168.15.10:8087/upload/2017/08/30/455f9d6c26b5c989b32eda1809e58d5f.jpg\", \"method_id\": null, \"land_id\": \"249be20d-5759-5af0-9859-b770d9f44e2a\", \"farm_id\": 1, \"state\": true, \"amount\": \"100ml\", \"workdate\": 1504105397, \"category_id\": \"9365ea66-be55-56f7-a511-059fc85a9478\", \"cdate\": 1504076614, \"id\": \"19e05f00-ae55-5605-be12-86dcd2866df9\"}], \"page\": {\"current\": 1, \"ajax\": false, \"total\": 1.0, \"num\": 15, \"totalNum\": 1}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/origin.py", "groupTitle": "Farm" }, { "type": "get", "url": "/origin", "title": "获取溯源批次列表", "version": "1.0.0", "name": "getOrigin", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "page", "description": "页数
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "list", "description": "溯源批次列表信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.name", "description": "名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.id", "description": "ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "page", "description": "分页信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.current", "description": "当前页
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.total", "description": "总页数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.num", "description": "每页数据条数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.totalNum", "description": "总数据条数
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": [{\"pic\": \"http://192.168.15.10:8087/upload/2017/08/30/455f9d6c26b5c989b32eda1809e58d5f.jpg\", \"method_id\": null, \"land_id\": \"249be20d-5759-5af0-9859-b770d9f44e2a\", \"farm_id\": 1, \"state\": true, \"amount\": \"100ml\", \"workdate\": 1504105397, \"category_id\": \"9365ea66-be55-56f7-a511-059fc85a9478\", \"cdate\": 1504076614, \"id\": \"19e05f00-ae55-5605-be12-86dcd2866df9\"}], \"page\": {\"current\": 1, \"ajax\": false, \"total\": 1.0, \"num\": 15, \"totalNum\": 1}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/origin.py", "groupTitle": "Farm" }, { "type": "get", "url": "/work/info", "title": "获取农事信息", "version": "1.0.0", "name": "getWork", "group": "Farm", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "info", "description": "农事信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.name", "description": "名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "info.id", "description": "ID
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": [{\"pic\": \"http://192.168.15.10:8087/upload/2017/08/30/455f9d6c26b5c989b32eda1809e58d5f.jpg\", \"method_id\": null, \"land_id\": \"249be20d-5759-5af0-9859-b770d9f44e2a\", \"farm_id\": 1, \"state\": true, \"amount\": \"100ml\", \"workdate\": 1504105397, \"category_id\": \"9365ea66-be55-56f7-a511-059fc85a9478\", \"cdate\": 1504076614, \"id\": \"19e05f00-ae55-5605-be12-86dcd2866df9\"}], \"page\": {\"current\": 1, \"ajax\": false, \"total\": 1.0, \"num\": 15, \"totalNum\": 1}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/work.py", "groupTitle": "Farm" }, { "type": "get", "url": "/work/category", "title": "获取农事分类列表", "version": "1.0.0", "name": "getWorkCateList", "group": "Farm", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "list", "description": "分类列表信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.name", "description": "名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.id", "description": "ID
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": [{\"state\": true, \"farm_id\": 1, \"cdate\": 1504074837, \"id\": \"9365ea66-be55-56f7-a511-059fc85a9478\", \"name\": \"\\u65bd\\u80a5\"}]}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/work.py", "groupTitle": "Farm" }, { "type": "get", "url": "/work/land", "title": "获取农事地块列表", "version": "1.0.0", "name": "getWorkLandList", "group": "Farm", "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "list", "description": "地块列表信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.name", "description": "名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.id", "description": "ID
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": [{\"state\": true, \"farm_id\": 1, \"cdate\": 1504074548, \"id\": \"249be20d-5759-5af0-9859-b770d9f44e2a\", \"name\": \"test\"}]}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/work.py", "groupTitle": "Farm" }, { "type": "get", "url": "/work", "title": "获取农事记录列表", "version": "1.0.0", "name": "getWorkList", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "page", "description": "页数
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "setting", "description": "基本信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "setting.name", "description": "站点名
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "setting.farm", "description": "当前的农场ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "list", "description": "农事列表信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.name", "description": "名称
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "list.id", "description": "ID
" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "page", "description": "分页信息
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.current", "description": "当前页
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.total", "description": "总页数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.num", "description": "每页数据条数
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "page.totalNum", "description": "总数据条数
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"yes\", \"code\": 0, \"data\": {\"setting\": {\"farm\": 1, \"user\": 0, \"name\": \"\\u519c\\u5c0f\\u76d2\", \"copyright\": \"2017 nongxiaohe.com v1.0.0\", \"site\": \"http://www.nongxiaohe.com/\"}, \"list\": [{\"pic\": \"http://192.168.15.10:8087/upload/2017/08/30/455f9d6c26b5c989b32eda1809e58d5f.jpg\", \"method_id\": null, \"land_id\": \"249be20d-5759-5af0-9859-b770d9f44e2a\", \"farm_id\": 1, \"state\": true, \"amount\": \"100ml\", \"workdate\": 1504105397, \"category_id\": \"9365ea66-be55-56f7-a511-059fc85a9478\", \"cdate\": 1504076614, \"id\": \"19e05f00-ae55-5605-be12-86dcd2866df9\"}], \"page\": {\"current\": 1, \"ajax\": false, \"total\": 1.0, \"num\": 15, \"totalNum\": 1}}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/work.py", "groupTitle": "Farm" }, { "type": "post", "url": "/device/set", "title": "更新极限值设置", "version": "1.0.0", "name": "updateDeviceSet", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "设备id
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_max", "description": "最大上限
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_min", "description": "最小下限
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Bool", "optional": false, "field": "status", "description": "状态
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg", "description": "描述
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "code", "description": "状态码
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"操作成功\", \"code\": 0, \"data\": {}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/device.py", "groupTitle": "Farm" }, { "type": "post", "url": "/farm", "title": "更新农场信息", "version": "1.0.0", "name": "updateFarm", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "农事ID,为空则插入新记录
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_name", "description": "农场名称
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_address", "description": "农场地址
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_master_name", "description": "联系人
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_tel", "description": "联系电话
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_pic", "description": "农场照片
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Bool", "optional": false, "field": "status", "description": "状态
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg", "description": "描述
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "code", "description": "状态码
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"操作成功\", \"code\": 0, \"data\": {}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/farm.py", "groupTitle": "Farm" }, { "type": "post", "url": "/origin", "title": "更新溯源批次", "version": "1.0.0", "name": "updateOrigin", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "批次ID,为空则插入新记录
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_name", "description": "批次名称
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_pic", "description": "图片,多个逗号隔开
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_device_id", "description": "设备网关ID
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_land", "description": "地块ID
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_zzdate", "description": "种植时间:2017-10-10
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_csdate", "description": "采收时间:2017-10-10
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Bool", "optional": false, "field": "status", "description": "状态
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg", "description": "描述
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "code", "description": "状态码
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"操作成功\", \"code\": 0, \"data\": {}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/origin.py", "groupTitle": "Farm" }, { "type": "post", "url": "/work", "title": "更新农事记录", "version": "1.0.0", "name": "updateWork", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "农事ID,为空则插入新记录
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_pic", "description": "图片,多个逗号隔开
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_category", "description": "农事方式ID
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_land", "description": "地块ID
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_workdate", "description": "农事时间:2017-10-10
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_content", "description": "劳作内容
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_amount", "description": "劳作数量
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Bool", "optional": false, "field": "status", "description": "状态
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg", "description": "描述
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "code", "description": "状态码
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"操作成功\", \"code\": 0, \"data\": {}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/work.py", "groupTitle": "Farm" }, { "type": "post", "url": "/work/land", "title": "更新地块", "version": "1.0.0", "name": "updateWorkLand", "group": "Farm", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "id", "description": "地块ID,为空则插入新记录
" }, { "group": "Parameter", "type": "String", "optional": false, "field": "update_name", "description": "地块名称
" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Bool", "optional": false, "field": "status", "description": "状态
" }, { "group": "Success 200", "type": "String", "optional": false, "field": "msg", "description": "描述
" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "code", "description": "状态码
" } ] } }, "error": { "examples": [ { "title": "操作成功", "content": "{\"status\": 1, \"msg\": \"操作成功\", \"code\": 0, \"data\": {}}", "type": "json" }, { "title": "操作失败", "content": "{\"status\": 2, \"msg\": \"\\u64cd\\u4f5c\\u5931\\u8d25\", \"code\": 0, \"data\": {}}", "type": "json" } ] }, "filename": "/root/input/nongxiaohe/front/api/work.py", "groupTitle": "Farm" } ]