mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
response类增加create方法 改进think\response\redirect类 改进助手函数和traits\controller\Jump
This commit is contained in:
@@ -117,12 +117,7 @@ class App
|
||||
// 监听app_end
|
||||
APP_HOOK && Hook::listen('app_end', $data);
|
||||
$type = IS_AJAX ? Config::get('default_ajax_return') : Config::get('default_return_type');
|
||||
if (in_array(strtolower($type), ['json', 'jsonp', 'xml'])) {
|
||||
$class = '\\think\\response\\' . ucfirst($type);
|
||||
} else {
|
||||
$class = '\\think\\Response';
|
||||
}
|
||||
return (new $class($data, $type))->send();
|
||||
return Response::create($data, $type)->send();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user