From 1573df7e91538f0e79aab5b1dddfac118049767d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Tue, 15 Oct 2024 09:06:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E5=8F=96=E6=B6=88=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=87=AA=E5=8A=A8=E5=88=A4=E6=96=AD=E8=87=B3?= =?UTF-8?q?=20jsonp=EF=BC=8C=E5=9B=A0=E4=B8=BA=E8=B7=A8=E5=9F=9F=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=9D=87=E4=BC=9A=E8=A2=AB=E4=B8=AD=E9=97=B4=E4=BB=B6?= =?UTF-8?q?=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/controller/Api.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/common/controller/Api.php b/app/common/controller/Api.php index 50b39b6a..e611a5d7 100644 --- a/app/common/controller/Api.php +++ b/app/common/controller/Api.php @@ -114,8 +114,7 @@ class Api extends BaseController 'data' => $data, ]; - // 如果未设置类型则自动判断 - $type = $type ?: ($this->request->param(Config::get('route.var_jsonp_handler')) ? 'jsonp' : $this->responseType); + $type = $type ?: $this->responseType; $code = 200; if (isset($header['statuscode'])) {