[更新]修改后台ajax错误提示

This commit is contained in:
Anyon 2019-08-05 16:15:10 +08:00
parent f7766e68a7
commit 1396c2c0b5

View File

@ -193,10 +193,12 @@ $(function () {
if (typeof headers === 'object') for (var i in headers) xhr.setRequestHeader(i, headers[i]);
}, error: function (XMLHttpRequest) {
layer.open({
type: 2, area: ["800px", "500px"], content: 'javascript:void(0)',
title: XMLHttpRequest.status + ' - ' + XMLHttpRequest.statusText,
success: function ($element) {
$element.find('iframe')[0].contentWindow.document.write(XMLHttpRequest.responseText)
title: XMLHttpRequest.status + ' - ' + XMLHttpRequest.statusText + "(返回状态异常详情)",
type: 2, area: ["800px", "500px"], content: ['javascript:void(0)'],
success: function ($element, index) {
layer.full(index);
$element.find('iframe')[0].contentWindow.document.write(XMLHttpRequest.responseText);
$element.find('.layui-layer-title').addClass('font-s16 font-w7 text-center color-red')
}
});
if (parseInt(XMLHttpRequest.status) === 200) {