model = new \app\api\model\UploadLog(); } /** * @OA\Get ( * path="log/index",tags={"上传日志管理"},summary="获取上传日志列表",description="根据相关参数获取日志列表", * @OA\Parameter(ref="#/components/parameters/token"), * @OA\Parameter(name="username",in="query",description="管理员名称",@OA\Schema (type="string")), * @OA\Parameter(name="model",in="query",description="操作模块",@OA\Schema (type="string")), * @OA\Parameter (name="page",in="query",description="当前页码",@OA\Schema (type="integer",format="int15")), * @OA\Parameter (name="limit",in="query",description="分页数量",@OA\Schema (type="integer",format="int15")), * @OA\Response( * response=200, * description="返回管理员用户数据信息", * @OA\JsonContent(ref="#/components/schemas/LogMsgExport"), * ), * ), */ public function index() { //接受参数 $_get = $this->request->get(); //指定搜索参数 // $this->model->search_arr = ['current']; //数据处理 $_data = $this->model->index(); //返回数据 return send_http_status($_data); } public function add() { //接收参数 $_post = $this->request->post(); //处理并返回参数 $insertId = $this->model->parentAdd($_post); return send_http_status($insertId, $insertId ? 201 : 202); } /** * @Log [sys_name]在[sys_time] 删除了文件数据 */ public function delete() { //接收参数 $ids = $this->request->param('id'); //验证参数 validate(['ids|id' => 'require|length:1,1000'])->check(['ids' => $ids]); //处理并返回数据 return send_http_status('', $this->model->parentDel($ids) ? 205 : 206); } public function getSiteLists(){ //数据处理 $_data = $this->model->getLists(); //返回数据 return send_http_status($_data); } public function getTagLists(){ $tagLists = config('dict.sqlfields.image_storage_type'); $senddData = []; foreach ($tagLists as $key => $val){ $item = []; $item['title'] = $key; $item['name'] = $val; $senddData[] = $item; } return send_http_status($senddData); } public function getStorageImages(){ $model = new ImageStorages(); $model->search_arr = ['title']; $_data = $model->getStorgaeImagesLists(); //返回数据 return send_http_status($_data); } }