From 0eb01697016efb23baf6c659f0d20e19d76e00bd Mon Sep 17 00:00:00 2001 From: WispX <1591788658@qq.com> Date: Sun, 15 Mar 2020 20:29:09 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/index/controller/Upload.php b/application/index/controller/Upload.php index 3acfb028..c967e8a6 100755 --- a/application/index/controller/Upload.php +++ b/application/index/controller/Upload.php @@ -29,10 +29,10 @@ class Upload extends Base Db::commit(); } catch (Exception $e) { Db::rollback(); - return response($e->getMessage(), 500); + return json(['error' => $e->getMessage()]); } catch (ErrorException $e) { Db::rollback(); - return response($e->getMessage(), 500); + return json(['error' => $e->getMessage()]); } $this->result($data, 200, '上传成功');