From 0cdb956065bd65d415e8f98ece9ce4cf08b24729 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 2 Jul 2026 16:56:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(http):=20=E4=B8=BA=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA=E6=B7=BB=E5=8A=A0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将原始的请求失败和域名不在白名单的提示中,新增传入err参数到多语言翻译中,展示更详细的错误信息 --- common/js/http.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/js/http.js b/common/js/http.js index 483636e..df855fe 100644 --- a/common/js/http.js +++ b/common/js/http.js @@ -171,7 +171,7 @@ export default { fail: (res) => { if (res.errMsg && res.errMsg == 'request:fail url not in domain list') { uni.showToast({ - title: getLang().lang('http.domainNotInList', { url: Config.baseUrl }), + title: getLang().lang('http.domainNotInList', { url: Config.baseUrl, err: res.errMsg }), 'icon': 'none', duration: 10000 }); @@ -182,7 +182,7 @@ export default { complete: (res) => { if ((res.errMsg && res.errMsg != "request:ok") || (res.statusCode && [200, 500].indexOf(res.statusCode) == -1)) { uni.showToast({ - title: getLang().lang('http.requestFailed', { url: Config.baseUrl }), + title: getLang().lang('http.requestFailed', { url: Config.baseUrl, err: res.errMsg }), 'icon': 'none', duration: 10000 });