作者 lyh

变更数据

@@ -389,11 +389,14 @@ class FileController @@ -389,11 +389,14 @@ class FileController
389 */ 389 */
390 public function getFileList(){ 390 public function getFileList(){
391 if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){ 391 if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){
392 - $this->map['project_id'] = $this->cache['project_id']; 392 + $this->param['project_id'] = $this->cache['project_id'];
393 } 393 }
394 $fileModel = new File(); 394 $fileModel = new File();
395 - $this->map['type'] = 'mp4';  
396 - $lists = $fileModel->list($this->map,'id',['id','hash','type','path','created_at','name']); 395 + $this->param['type'] = 'mp4';
  396 + $page = $this->param['page'] ?? 1;
  397 + $row = $this->param['row'] ?? 20;
  398 + unset($this->param['page'],$this->param['row']);
  399 + $lists = $fileModel->lists($this->param,$page,$row,'id',['id','hash','type','path','created_at','name']);
397 foreach ($lists as $k => $v){ 400 foreach ($lists as $k => $v){
398 $v['file_link'] = getFileUrl($v['path'],$this->cache['storage_type'] ?? 0,$this->cache['project_location'] ?? 0,$this->cache['file_cdn'] ?? 0); 401 $v['file_link'] = getFileUrl($v['path'],$this->cache['storage_type'] ?? 0,$this->cache['project_location'] ?? 0,$this->cache['file_cdn'] ?? 0);
399 $lists[$k] = $v; 402 $lists[$k] = $v;