mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
优化一处数组的写法,避免Notice错误
This commit is contained in:
@@ -69,10 +69,12 @@ class Response
|
|||||||
*/
|
*/
|
||||||
public static function result($data, $code = 0, $msg = '', $type = '')
|
public static function result($data, $code = 0, $msg = '', $type = '')
|
||||||
{
|
{
|
||||||
$result['code'] = $code;
|
$result = [
|
||||||
$result['msg'] = $msg;
|
'code' => $code,
|
||||||
$result['time'] = NOW_TIME;
|
'msg' => $msg,
|
||||||
$result['data'] = $data;
|
'time' => NOW_TIME,
|
||||||
|
'data' => $data
|
||||||
|
];
|
||||||
self::returnData($result, $type);
|
self::returnData($result, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user