我是extjs的新手,我遇到了跨域问题。
Ext.Ajax.request({
method: "POST",
url:'url',
params:{
ahq_id: '104',
username:'',
password:'',
callback:'WCL_Parser',
},
async: true,
dataType: 'jsonp',
success: function(response){
console.info(response);
}
});
我收到错误
XMLHttpRequest cannot load http://182.73.236.115:8080/WCLRESTService/rest/Map/showVehiclesOnMap. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8282' is therefore not allowed access.
即使我尝试使用回调功能
function WCL_Parser(data){
console.info(data);
}
错误未解决。提前谢谢。