mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
修正response类的type方法
This commit is contained in:
@@ -16,7 +16,7 @@ class Response
|
|||||||
// 输出数据的转换方法
|
// 输出数据的转换方法
|
||||||
protected static $tramsform = null;
|
protected static $tramsform = null;
|
||||||
// 输出数据的类型
|
// 输出数据的类型
|
||||||
protected static $type = 'html';
|
protected static $type = '';
|
||||||
// 输出数据
|
// 输出数据
|
||||||
protected static $data = '';
|
protected static $data = '';
|
||||||
// 是否exit
|
// 是否exit
|
||||||
@@ -98,9 +98,8 @@ class Response
|
|||||||
public static function type($type = null)
|
public static function type($type = null)
|
||||||
{
|
{
|
||||||
if (is_null($type)) {
|
if (is_null($type)) {
|
||||||
return self::$type;
|
return self::$type ?: Config::get('default_return_type');
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$type = $type;
|
self::$type = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +125,6 @@ class Response
|
|||||||
if (is_null($exit)) {
|
if (is_null($exit)) {
|
||||||
return self::$isExit;
|
return self::$isExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$isExit = (boolean) $exit;
|
self::$isExit = (boolean) $exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user