From f54123e216b5ad780ec88e37706a37d5bea71f57 Mon Sep 17 00:00:00 2001 From: augushong Date: Tue, 27 Sep 2022 17:04:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B7=B3=E8=BD=AC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AF=B9php8.1=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/traits/JumpTrait.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/common/traits/JumpTrait.php b/app/common/traits/JumpTrait.php index 330f025..1e8ed2c 100644 --- a/app/common/traits/JumpTrait.php +++ b/app/common/traits/JumpTrait.php @@ -41,6 +41,11 @@ trait JumpTrait $type = $this->getResponseType(); if ($type == 'html') { + + if (is_null($result['url'])) { + $result['url'] = ''; + } + $response = view(app('config')->get('app.dispatch_success_tmpl'), $result); } elseif ($type == 'json') { $response = json($result); @@ -76,6 +81,9 @@ trait JumpTrait 'wait' => $wait, ]; if ($type == 'html') { + if (is_null($result['url'])) { + $result['url'] = ''; + } $response = view(app('config')->get('app.dispatch_error_tmpl'), $result); } elseif ($type == 'json') { $response = json($result);