优化后台UI

完善表单上传组件
This commit is contained in:
2020-04-08 21:07:23 +08:00
parent f8c58b15cd
commit f42b62738d
18 changed files with 389 additions and 247 deletions

View File

@@ -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 [];
}