去除提示弹窗icon

This commit is contained in:
2024-10-10 16:24:43 +08:00
parent 376aa06705
commit 388f33985e

View File

@@ -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()