ios ajax error
下面这段代码,在部分iphone(版本11.4.1)机型上会概率性走到error函数,
注意:
1、不是全部iphone有问题
2、不是每次调用有问题,概率性会出现问题
哪位遇到过?
$.ajax('http://www.xxx.com/wechat/travelAgency/login1',
{
method: "get",
data:{account:$("#iptAccount").val().trim(),password:$("#iptPassword").val().trim()},
success: function (result)
{
window.location.href="http://www.xxx.com/wechat/travelAgency/main";
},
error: function(XMLHttpRequest, textStatus, errorThrown){
layer.close(layerIndex);
layer.open({
content: XMLHttpRequest.status+"-"+XMLHttpRequest.readyState+"-"+textStatus
,skin: 'msg'
,time: 10 //2秒后自动关闭
});
}
});