为什么在4G网络的情况下不执行success回调函数
在wifi 下,一点问题都没有,在4g环境下经常会出现不执行success里面的代码
$.ajax({
url:"http://192.168.6.45:8080/service/submit?callback=jsonpCallback&batchId=" + response.batchId + "&bidNumber=" + response.bidNumber + "&interfaceId=" + response.interfaceId + "&auctionHeaderId=" + auctionHeaderId + "&t=" + Math.random(),
dataType:'jsonp',
data: {"val": strVal.replace(/[\n]/ig,''), "price": strPrice.replace(/[\n]/ig,'')},
jsonp:'callback',
jsonpCallback:"jsonpCallback",
success:function(result) {
if(result.returnCode) {
ProfilesAucSer.toGo($scope, response.batchId, response.bidNumber, auctionHeaderId, response.bidNumberActive).success(function (dataToGo) {
if(dataToGo.returnCode == "SUCCESS" && dataToGo.returnNum == '0') {
var alertPopup = $ionicPopup.alert({
title: '提交成功',
template: '感谢您的参与!'
});
$state.go("app.dashboard");
} else {
var alertPopup = $ionicPopup.alert({
title: '提交失败',
template: '请联系系统相关人员!'
});
$state.go("app.dashboard");
}
});
} else {
var alertPopup = $ionicPopup.alert({
title: '提交失败',
template: '请联系系统相关人员!'
});
$state.go("app.dashboard");
}
},
timeout:2000
});