This commit is contained in:
cwchen 2024-04-22 13:02:16 +08:00
parent 2e2614490c
commit aa8ac24911
1 changed files with 13 additions and 2 deletions

View File

@ -39,8 +39,19 @@ layui.use(function () {
layer.msg(result.msg, { icon: 2 }); layer.msg(result.msg, { icon: 2 });
} }
}, function (xhr, status, error) { }, function (xhr, status, error) {
error(xhr, status, error) errorFn(xhr, status, error)
$('.layui-btn-fluid').empty().append('登 录'); $('.layui-btn-fluid').empty().append('登 录');
}, "application/json", aqEnnable); }, "application/json", aqEnnable);
}); });
}); });
/* 请求错误 */
function errorFn(xhr, status, error) {
if (xhr.status === 0) {
// 网络连接失败
console.error("网络连接失败,请检查网络是否正常");
} else {
// 请求出现其他错误
console.error("ajax请求错误" + error);
}
}