|
...
|
...
|
@@ -47,7 +47,20 @@ class FileController extends BaseController |
|
|
|
* @time 2023/5/29 11:42
|
|
|
|
*/
|
|
|
|
public function lists(){
|
|
|
|
$files = Upload::lists($this->param['config'] ?? 'default',['png','jpg','jpeg','gif']);
|
|
|
|
$type = \request()->get('type');
|
|
|
|
|
|
|
|
switch ($type){
|
|
|
|
case 'video':{
|
|
|
|
$ext = ['mp4','avi'];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:{
|
|
|
|
$ext = ['png','jpg','jpeg','gif'];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$files = Upload::lists($this->param['config'] ?? 'default',$ext);
|
|
|
|
return $this->success($files);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|