From a4c03a454e0c69e5565d1798181629161fcf3da5 Mon Sep 17 00:00:00 2001 From: liveup Date: Sun, 4 Sep 2022 01:29:50 +0000 Subject: [PATCH] =?UTF-8?q?update=20app/BaseController.php.=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=5Fajax=3D1,=5Fpajax=3D1=E4=BC=AA=E8=A3=85=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liveup --- app/BaseController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/BaseController.php b/app/BaseController.php index f0064ab4..51ede024 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -235,7 +235,8 @@ class BaseController */ protected function getResponseType(): string { - return request()->isAjax() || request()->acceptJson() ? 'json' : 'html'; + $mask=request()->input('_ajax')==1 ||request()->input('_pjax')==1; + return request()->isAjax() || request()->acceptJson() || $mask ? 'json' : 'html'; } /** -- Gitee