diff --git a/library/think/Response.php b/library/think/Response.php index d65d2a35..634a2d99 100644 --- a/library/think/Response.php +++ b/library/think/Response.php @@ -68,7 +68,7 @@ class Response { $type = strtolower($type ?: (IS_AJAX ? 'json' : 'html')); if (!isset(self::$instance[$type])) { - $class = '\\think\\response\\' . ucfirst($type); + $class = (isset($options['namespace']) ? $options['namespace'] : '\\think\\response\\') . ucfirst($type); if (class_exists($class)) { $response = new $class($data, $type, $options); } else {