正在显示
1 个修改的文件
包含
5 行增加
和
3 行删除
| @@ -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 | } |
-
请 注册 或 登录 后发表评论