mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
去除Response类的result方法 改进Jump里面的result方法
This commit is contained in:
@@ -99,7 +99,14 @@ trait Jump
|
||||
*/
|
||||
protected function result($data, $code = 0, $msg = '', $type = '')
|
||||
{
|
||||
return Response::create([], $type)->result($data, $code, $msg);
|
||||
$result = [
|
||||
'code' => $code,
|
||||
'msg' => $msg,
|
||||
'time' => $_SERVER['REQUEST_TIME'],
|
||||
'data' => $data,
|
||||
];
|
||||
$type = $type ?: $this->getResponseType();
|
||||
return Response::create([], $type)->data($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user