Javascript Meteor客户端Ajax帖子在iOS 10 iPhone 6 Plus上不起作用 我有一个Meteor应用程序(Angular JS在iOS 10.0 iPhone 6 Plus上运行) 该程序从Meteor的客户端控制器对ASP.NET WebAPI url执行ajax调用,但无法检索数据;不过,如果在我的苹果Mac Pro笔记本电脑上运行相同的Meteor应用程序,它就可以正常工作 此应用程序不需要客户端代码来调用服务器端代码上的Meteor.Method 我是否需要在iPhone或Meteor应用程序中配置一些设置,以允许Ajax调用正常工作
下面是一个ajax调用:Javascript Meteor客户端Ajax帖子在iOS 10 iPhone 6 Plus上不起作用 我有一个Meteor应用程序(Angular JS在iOS 10.0 iPhone 6 Plus上运行) 该程序从Meteor的客户端控制器对ASP.NET WebAPI url执行ajax调用,但无法检索数据;不过,如果在我的苹果Mac Pro笔记本电脑上运行相同的Meteor应用程序,它就可以正常工作 此应用程序不需要客户端代码来调用服务器端代码上的Meteor.Method 我是否需要在iPhone或Meteor应用程序中配置一些设置,以允许Ajax调用正常工作,javascript,jquery,ios,iphone,ajax,Javascript,Jquery,Ios,Iphone,Ajax,下面是一个ajax调用: url = 'http://pAPI.mydomain.Com:81/Api/GlgResults'; //alert('in ajax call now'); $.ajax({ type: "POST", traditional: true, url: url, contentType: 'application/json; charset=utf-8', dataType: "json", data: {
url = 'http://pAPI.mydomain.Com:81/Api/GlgResults';
//alert('in ajax call now');
$.ajax({
type: "POST",
traditional: true,
url: url,
contentType: 'application/json; charset=utf-8',
dataType: "json",
data: {
Username: 'myemail@gmail.com',
UserToken: '',
State: state,
Game: game,
GameType: gameType,
NumberType: numberType,
StartDate: '2016-01-01', //startDate,
EndDate: '2016-12-30', //endDate,
},
success: function (result) {
//debugger
//alert('in ajax call success');
$scope.MMAjaxToMMResultsSuccess(result);
},
error: function (xhr) {
//alert('in ajax call failed!');
alert(xhr);
alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
}
});
Ajax调用返回后,将显示以下消息:
Request Status: 0 Status Text: error
基本上,响应文本是bank