perf: 优化频繁发送短信,将后端的频繁发送警告提示到页面上来提醒用户

This commit is contained in:
jiangweidong
2024-04-19 17:11:25 +08:00
committed by Bryan
parent ad0bc82539
commit ef7329a721
3 changed files with 15 additions and 6 deletions

View File

@@ -118,11 +118,18 @@
})
}
function onError (responseText, responseJson, status) {
setTimeout(function () {
toastr.error(responseJson.detail);
});
};
requestApi({
url: url,
method: "POST",
body: JSON.stringify(data),
success: onSuccess,
error: onError,
flash_message: false
})
}