瀏覽代碼

优化接口

huangsanjia 1 年之前
父節點
當前提交
ce872904af
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      application/api/controller/ReportingWork.php

+ 3 - 0
application/api/controller/ReportingWork.php

@@ -432,6 +432,9 @@ class ReportingWork extends Api
             $this->error('非法请求');
         }
         $params = Request::instance()->get();
+        if (empty($params['addr'])){
+            $this->error('参数不能为空');
+        }
         $data = \db('设备_基本资料')->where('sys_sbID',$params['addr'])->field('设备编号,rtrim(使用部门) as 使用部门')->find();
         $this->success('请求成功',$data);
     }