请求500处理

This commit is contained in:
YeMingfei666 2025-01-09 17:47:29 +08:00
parent a667473da1
commit 9ac12b7627
1 changed files with 8 additions and 3 deletions

View File

@ -73,6 +73,11 @@ function commonsProcess(showLoading, httpReqCallback,isreturm) {
isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code == 500) {
// 提示信息
isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code != 0) {
infoBox.showToast(data.message);
return;
@ -110,7 +115,7 @@ function commonsProcess(showLoading, httpReqCallback,isreturm) {
reject();
}
if (res.code == 500) {
infoBox.showErrorToast(res.message || "服务器异常").then(() => {});
infoBox.showErrorToast(res.msg || "服务器异常").then(() => {});
reject();
}
reqFinishFunc(); // 请求完毕的动作