mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进页面trace输出
This commit is contained in:
@@ -53,8 +53,11 @@ class Response
|
||||
if (isset($this->contentTypes[$this->type])) {
|
||||
$this->contentType($this->contentTypes[$this->type]);
|
||||
}
|
||||
|
||||
$this->options = array_merge($this->options, $options);
|
||||
if(!empty($options)){
|
||||
$this->options = array_merge($this->options, $options);
|
||||
}
|
||||
// 方便获取某个类型的实例
|
||||
self::$instance[$this->type] = $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,6 +100,8 @@ class Response
|
||||
$data = call_user_func_array($this->transform, [$data]);
|
||||
}
|
||||
|
||||
define('RESPONSE_TYPE',$this->type);
|
||||
|
||||
// 处理输出数据
|
||||
$data = $this->output($data);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class Trace
|
||||
*/
|
||||
public function save(array $log = [])
|
||||
{
|
||||
if (IS_AJAX || IS_CLI || IS_API || 'html' != Config::get('default_return_type')) {
|
||||
if (IS_AJAX || IS_CLI || IS_API || 'html' != RESPONSE_TYPE) {
|
||||
// ajax cli api方式下不输出
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user