优化后台UI
完善表单上传组件
This commit is contained in:
@@ -10,6 +10,7 @@ namespace app\controller;
|
||||
|
||||
use think\facade\Session;
|
||||
use think\facade\Filesystem;
|
||||
use think\facade\Db;
|
||||
|
||||
class Upload extends Base {
|
||||
|
||||
@@ -53,9 +54,22 @@ class Upload extends Base {
|
||||
if (!isset($param['name'])) {
|
||||
return $this->error('非法操作');
|
||||
}
|
||||
$pageConfig = [
|
||||
'list_rows' => $this->request->param('list_rows', 20),
|
||||
'page' => $this->request->param('page', 1),
|
||||
'query' => $this->request->param()
|
||||
];
|
||||
if($param['type'] == 'file'){
|
||||
$list = Db::name('File')->paginate($pageConfig);
|
||||
}else{
|
||||
$list = Db::name('Picture')->paginate($pageConfig);
|
||||
}
|
||||
|
||||
$this->data = [
|
||||
'from' => $this->request->param('from'),
|
||||
'param' => $param,
|
||||
'list' => $list,
|
||||
'page' => $list->render(),
|
||||
'require' => [
|
||||
'jsname' => 'upload',
|
||||
'actionname' => 'server'
|
||||
@@ -81,7 +95,7 @@ class Upload extends Base {
|
||||
return json($data);
|
||||
}
|
||||
|
||||
protected function images(){
|
||||
protected function image(){
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user