From 388f33985e58bbb88639e46e088b028722822a74 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 10 Oct 2024 16:24:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=8F=90=E7=A4=BA=E5=BC=B9?= =?UTF-8?q?=E7=AA=97icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/http.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/http/http.js b/http/http.js index 9d21bed..14122b6 100644 --- a/http/http.js +++ b/http/http.js @@ -78,7 +78,7 @@ function commonsProcess(showLoading, httpReqCallback){ // http响应码不正确 if(statusCode != 200){ isShowErrorToast = true - infoBox.showErrorToast('服务器异常') + infoBox.showToast('服务器异常') return Promise.reject(bodyData) // 跳转到catch函数 } @@ -105,14 +105,11 @@ function commonsProcess(showLoading, httpReqCallback){ return Promise.resolve({ bizData: bodyData.data, code: bodyData.code }) }).catch( res => { - reqFinishFunc(); // 请求完毕的动作 - // 如果没有提示错误, 那么此处提示 异常。 if(!isShowErrorToast){ - infoBox.showErrorToast(`请求网络异常`) + infoBox.showToast(`请求网络异常`) } - return Promise.reject(res) }).finally(() => { // finally 是 then结束后再执行, 此处不适用。 需要在请求完成后立马调用: reqFinishFunc()