Update Upload.php

This commit is contained in:
Anyon 2022-06-17 16:19:00 +08:00
parent 7e446bae09
commit 7b3d4047cb

View File

@ -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