From c2523f351606f7853e248eeec5b1a1639cb8e245 Mon Sep 17 00:00:00 2001 From: huangdijia Date: Mon, 7 Dec 2015 17:44:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E5=A4=84=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E7=9A=84=E5=86=99=E6=B3=95=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?Notice=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/response.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/think/response.php b/library/think/response.php index f01559d8..df5986de 100644 --- a/library/think/response.php +++ b/library/think/response.php @@ -69,10 +69,12 @@ class Response */ public static function result($data, $code = 0, $msg = '', $type = '') { - $result['code'] = $code; - $result['msg'] = $msg; - $result['time'] = NOW_TIME; - $result['data'] = $data; + $result = [ + 'code' => $code, + 'msg' => $msg, + 'time' => NOW_TIME, + 'data' => $data + ]; self::returnData($result, $type); }