优化上传组件

This commit is contained in:
2020-04-11 22:29:27 +08:00
parent b03606abd7
commit 456d63a231
4 changed files with 37 additions and 66 deletions

View File

@@ -115,7 +115,20 @@ class Upload extends Base {
}
public function filemanage(){
return [];
$pageConfig = [
'list_rows' => $this->request->param('list_rows', 20),
'page' => $this->request->param('page', 1),
'query' => $this->request->param()
];
$map[] = ['type', '=', 'image'];
$data = Db::where($map)->name('Attach')->paginate($pageConfig)->each(function($item, $key){
$item['thumbURL'] = $item['url'];
$item['oriURL'] = $item['url'];
return $item;
})->toArray();
$data['code'] = "000";
return $data;
}
public function ueditor(){