From 7b3d4047cb17b7559ad03d14e72f666f705f26b5 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 17 Jun 2022 16:19:00 +0800 Subject: [PATCH] Update Upload.php --- app/admin/controller/api/Upload.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/admin/controller/api/Upload.php b/app/admin/controller/api/Upload.php index 61275dd16..a78348e80 100644 --- a/app/admin/controller/api/Upload.php +++ b/app/admin/controller/api/Upload.php @@ -17,6 +17,7 @@ namespace app\admin\controller\api; use think\admin\Controller; +use think\admin\helper\QueryHelper; use think\admin\model\SystemFile; use think\admin\service\AdminService; use think\admin\Storage; @@ -138,6 +139,24 @@ class Upload extends Controller } } + /** + * 文件选择器 + * @login true + * @return void + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + public function modal() + { + SystemFile::mQuery()->layTable(function () { + $this->title = '文件选择器'; + }, function (QueryHelper $query) { + $query->where(['status' => 2])->order('id desc'); + $query->like('name,hash')->dateBetween('create_at'); + }); + } + /** * 文件上传入口 * @login true