作者 lyh

gx

@@ -43,9 +43,11 @@ class FileManageController extends BaseController @@ -43,9 +43,11 @@ class FileManageController extends BaseController
43 $this->map['project_id'] = $this->user['project_id']; 43 $this->map['project_id'] = $this->user['project_id'];
44 $this->request['name'] && $this->map['name'] = ['like','%'.$this->request['name'].'%']; 44 $this->request['name'] && $this->map['name'] = ['like','%'.$this->request['name'].'%'];
45 $lists = $fileManage->lists($this->map, $this->page, $this->row); 45 $lists = $fileManage->lists($this->map, $this->page, $this->row);
46 - foreach ($lists as $k => $v){  
47 - $v['download_url'] = url('b/file_manager_downLoad?path='.$v['path']);  
48 - $lists[$k] = $v; 46 + if(!empty($lists)){
  47 + foreach ($lists as $k => $v){
  48 + $v['download_url'] = url('b/file_manager_downLoad?path='.$v['path']);
  49 + $lists[$k] = $v;
  50 + }
49 } 51 }
50 $this->response('success',Code::SUCCESS,$lists); 52 $this->response('success',Code::SUCCESS,$lists);
51 } 53 }