request->params([ ['file', 'file'], ]); $upload_service = new UploadService(); return success($upload_service->image($data['file'])); } /** * 远程图片拉取 * @return Response */ public function imageFetch(){ $data = $this->request->params([ ['url', ''], ]); $fetch_service = new FetchService(); return success($fetch_service->image($data['url'])); } /** * base64图片上传 * @return Response */ public function imageBase64(){ $data = $this->request->params([ ['content', ''], ]); $base64_service = new Base64Service(); return success($base64_service->image($data['content'])); } }