mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 05:52:48 +08:00
优化一处数组的写法,避免Notice错误
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user