改进Response类 改进traits\controller\Jump 添加response助手函数

This commit is contained in:
thinkphp
2016-05-11 07:51:41 +08:00
parent 70f184556d
commit 8e1cd9c51f
5 changed files with 166 additions and 289 deletions

View File

@@ -11,6 +11,8 @@
namespace think;
use think\Response;
/**
* App 应用管理
* @author liu21st <liu21st@gmail.com>
@@ -100,12 +102,12 @@ class App
default:
throw new Exception('dispatch type not support', 10008);
}
// 监听app_end
APP_HOOK && Hook::listen('app_end', $data);
// 输出数据到客户端
if (isset($data)) {
if (isset($data) && !is_null($data)) {
// 监听app_end
APP_HOOK && Hook::listen('app_end', $data);
// 自动响应输出
return Response::send($data, Response::type(), Config::get('response_return'));
return Response::send($data, '', Config::get('response_return'));
}
}