diff --git a/library/think/response/Redirect.php b/library/think/response/Redirect.php index c60c007f..f6604039 100644 --- a/library/think/response/Redirect.php +++ b/library/think/response/Redirect.php @@ -39,6 +39,16 @@ class Redirect extends Response return; } + /** + * 获取跳转地址 + * @return string + */ + public function getTargetUrl() + { + $this->getContent(); + return $this->header['Location']; + } + public function params($params = []) { $this->params = $params;