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