From 8a525f9f361e60b9d7af630ab97ecf651f8d6d36 Mon Sep 17 00:00:00 2001 From: augushong Date: Fri, 20 Mar 2020 15:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E7=BB=99success=E4=BC=A0=E5=85=A5URl?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E6=97=B6,=E4=B8=8D=E5=9C=A8=E8=BF=9B?= =?UTF-8?q?=E8=A1=8Curl=E8=AE=A1=E7=AE=97.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/BaseController.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/BaseController.php b/app/BaseController.php index ee77950..499810c 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -13,6 +13,7 @@ declare (strict_types = 1); namespace app; use think\App; +use think\app\Url; use think\exception\ValidateException; use think\Validate; use think\facade\View; @@ -108,7 +109,13 @@ abstract class BaseController if(is_null($jump_to_url)){ $jump_to_url = \request()->server('HTTP_REFERER'); }else{ - $jump_to_url = url($jump_to_url); + if($jump_to_url instanceof Url){ + + $jump_to_url = $jump_to_url; + }else{ + $jump_to_url = url($jump_to_url); + + } } $data = [ @@ -131,7 +138,13 @@ abstract class BaseController if(is_null($jump_to_url)){ $jump_to_url = \request()->server('HTTP_REFERER'); }else{ - $jump_to_url = url($jump_to_url); + if($jump_to_url instanceof Url){ + + $jump_to_url = $jump_to_url; + }else{ + $jump_to_url = url($jump_to_url); + + } } $data = [