在js文件中加入
headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
var content = {"field":"参数名称"};
xhr.post({
url : config.contextPath+"/getData/showfields",
handleAs : 'json',
content:content,
headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
load : lang.hitch(this, function(response){
this._pointFieldsAlians(feature,response);
}),
error : function(response, ioArgs) {
}
});