소스 검색

优化接口

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);
     }