From 039f05ce23b886c2a15084bbb46a896b76ff1e61 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 10 Jan 2025 16:20:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E7=89=B9=E6=AE=8A=EF=BC=9A=E5=A4=84=E7=90=86=E5=88=86?= =?UTF-8?q?=E9=94=80=E7=94=A8=E6=88=B7=E7=BB=91=E5=AE=9A=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/request/index.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sheep/request/index.js b/sheep/request/index.js index b6e4b9e0..ea595b7d 100644 --- a/sheep/request/index.js +++ b/sheep/request/index.js @@ -80,13 +80,13 @@ http.interceptors.request.use( if (config.custom.showLoading) { LoadingInstance.count++; LoadingInstance.count === 1 && - uni.showLoading({ - title: config.custom.loadingMsg, - mask: true, - fail: () => { - uni.hideLoading(); - }, - }); + uni.showLoading({ + title: config.custom.loadingMsg, + mask: true, + fail: () => { + uni.hideLoading(); + }, + }); } // 增加 token 令牌、terminal 终端、tenant 租户的请求头 @@ -124,9 +124,10 @@ http.interceptors.response.use( if (response.data.code === 401) { return refreshToken(response.config); } - - // 错误提示 - if (response.config.custom.showError) { + // 特殊:处理分销用户绑定失败的提示 + if ((response.data.code + '').includes('1011007')) { + console.error(`分销用户绑定失败,原因:${response.data.msg}`); + } else if (response.config.custom.showError) { // 错误提示 uni.showToast({ title: response.data.msg || '服务器开小差啦,请稍后再试~', icon: 'none',