东农后台api接口文档

接口文档


虫情测报灯-查看图片

<p>[TOC]</p> <h5>简要描述</h5> <ul> <li>虫情数据展示</li> </ul> <h5>请求URL</h5> <ul> <li><code>http://xgkj.hljnyxx.com/dongnongBackend/index.php//Home/Insect/getInsectPicInfo</code></li> </ul> <h5>请求方式</h5> <ul> <li>GET </li> </ul> <h5>参数</h5> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">deviceId</td> <td style="text-align: left;">是</td> <td>虫情设备编号</td> </tr> <tr> <td style="text-align: left;">pageNo</td> <td style="text-align: left;">是</td> <td>页码</td> </tr> <tr> <td style="text-align: left;">pageSize</td> <td style="text-align: left;">是</td> <td>每页显示数</td> </tr> <tr> <td style="text-align: left;">startTime</td> <td style="text-align: left;">否</td> <td>开始时间</td> </tr> <tr> <td style="text-align: left;">endTime</td> <td style="text-align: left;">否</td> <td>结束时间</td> </tr> </tbody> </table> <h5>返回示例</h5> <pre><code>{     &amp;quot;code&amp;quot;: 0,     &amp;quot;msg&amp;quot;: &amp;quot;查询成功&amp;quot;,     &amp;quot;data&amp;quot;: [         {             &amp;quot;id&amp;quot;: &amp;quot;1&amp;quot;,             &amp;quot;img_url&amp;quot;: &amp;quot;/Public/InsectPic/1.jpg&amp;quot;,             &amp;quot;create_time&amp;quot;: &amp;quot;2023-03-22 13:38:28&amp;quot;,             &amp;quot;identify_result&amp;quot;: [                 {                     &amp;quot;insect_count&amp;quot;: 1,                     &amp;quot;insect_type&amp;quot;: &amp;quot;398&amp;quot;,                     &amp;quot;insect_type_name&amp;quot;: &amp;quot;甜菜白带野螟&amp;quot;                 },                 {                     &amp;quot;insect_count&amp;quot;: 1,                     &amp;quot;insect_type&amp;quot;: &amp;quot;487&amp;quot;,                     &amp;quot;insect_type_name&amp;quot;: &amp;quot;棉大卷叶螟&amp;quot;                 }             ],             &amp;quot;device_id&amp;quot;: &amp;quot;521279&amp;quot;,             &amp;quot;total_count&amp;quot;: 2         },         {             &amp;quot;id&amp;quot;: &amp;quot;2&amp;quot;,             &amp;quot;img_url&amp;quot;: &amp;quot;/Public/InsectPic/1.jpg&amp;quot;,             &amp;quot;create_time&amp;quot;: &amp;quot;2023-04-13 16:03:19&amp;quot;,             &amp;quot;identify_result&amp;quot;: [                 {                     &amp;quot;insect_count&amp;quot;: 1,                     &amp;quot;insect_type&amp;quot;: &amp;quot;398&amp;quot;,                     &amp;quot;insect_type_name&amp;quot;: &amp;quot;甜菜白带野螟&amp;quot;                 },                 {                     &amp;quot;insect_count&amp;quot;: 1,                     &amp;quot;insect_type&amp;quot;: &amp;quot;487&amp;quot;,                     &amp;quot;insect_type_name&amp;quot;: &amp;quot;棉大卷叶螟&amp;quot;                 }             ],             &amp;quot;device_id&amp;quot;: &amp;quot;521279&amp;quot;,             &amp;quot;total_count&amp;quot;: 2         }     ],     &amp;quot;count&amp;quot;: &amp;quot;7&amp;quot; }</code></pre> <h5>返回参数说明</h5> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">img_url</td> <td>虫情图片在服务器端的相对地址</td> </tr> <tr> <td style="text-align: left;">create_time</td> <td>虫情图片上传地址</td> </tr> <tr> <td style="text-align: left;">total_count</td> <td>该图片内虫子总数</td> </tr> <tr> <td style="text-align: left;">identify_result</td> <td>虫情图片具体数据</td> </tr> <tr> <td style="text-align: left;">+insect_count</td> <td>虫子数量</td> </tr> <tr> <td style="text-align: left;">+insect_type</td> <td>虫子序号</td> </tr> <tr> <td style="text-align: left;">+insect_type_name</td> <td>虫子名称</td> </tr> </tbody> </table> <h5>备注</h5> <ul> <li>如果 startTime 和 endTime 参数不传,默认展示前一天的数据</li> <li>虫情图片显示完整需加地址前缀,例:前缀为 “<a href="http://xgkj.hljnyxx.com/dongnongBackend">http://xgkj.hljnyxx.com/dongnongBackend</a>”</li> </ul>

页面列表

ITEM_HTML