以下是我用来调用服务并获得响应的代码
$.getJSON("http://10.0.2.2:8080/v1/servive/26",
function(data) {
$.each(data, function(id, obj) {
$.each(obj, function(propName, value) {
alert("propName: "+propName+" value: "+value);
});
});
});
document.addEventListener("deviceready", onDeviceReady, true);
});