From 86c6e106cdad260f38d824e1462efb673a676642 Mon Sep 17 00:00:00 2001 From: FuFei <848125851@qq.com> Date: Thu, 24 Mar 2022 09:07:52 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20#I47OLE=20http=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=97=B6=E5=86=97=E4=BD=99=E7=9A=84=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=20=E4=B8=80=E8=88=AC=E5=AF=B9=E4=BA=8E=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=B3=BB=E7=BB=9F=E9=83=BD=E6=9C=89=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=8F=90=E7=A4=BA=EF=BC=8C=E6=89=80=E4=BB=A5?= =?UTF-8?q?=E9=80=9A=E5=B8=B8=E6=83=85=E5=86=B5=E4=B8=8B=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E8=AE=A9=E8=B0=83=E7=94=A8=E6=96=B9=E8=87=AA=E5=B7=B1=E4=BC=A0?= =?UTF-8?q?=E5=85=A5=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/pear/module/http.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/component/pear/module/http.js b/component/pear/module/http.js index 0779728..e1b1993 100644 --- a/component/pear/module/http.js +++ b/component/pear/module/http.js @@ -42,7 +42,8 @@ layui.define(['jquery', 'layer'], function (exports) { contentType: 'application/json', headers: { 'X-Requested-With': 'XMLHttpRequest' - } + }, + customHandleError: true }, defaultError: { @@ -112,7 +113,7 @@ layui.define(['jquery', 'layer'], function (exports) { }, handleErrorResponse: function (jqXHR, userOptions, $dfd) { - if (userOptions.customHandleError !== false) { + if (!userOptions.customHandleError) { switch (jqXHR.status) { case 401: http.ajax.showErrorAndRedirectUrl(http.ajax.defaultError401, http.appPath); -- Gitee