mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
Response类增加getCode方法和getContent方法 send方法data参数去掉 App类的run方法返回response对象
This commit is contained in:
@@ -123,12 +123,12 @@ class App
|
||||
|
||||
// 输出数据到客户端
|
||||
if ($data instanceof Response) {
|
||||
return $data->send();
|
||||
return $data;
|
||||
} elseif (!is_null($data)) {
|
||||
// 默认自动识别响应输出类型
|
||||
$isAjax = $request->isAjax();
|
||||
$type = $isAjax ? Config::get('default_ajax_return') : Config::get('default_return_type');
|
||||
return Response::create($data, $type)->send();
|
||||
return Response::create($data, $type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user