MM们
后端定义接口,然后前端用ajax请求,像这样:$.ajax({ type: 'GET',
url:"填后端给的接口",
dataType: 'json',
success: function (data) {
console.log(data);
}, error:function (err) {
console.log(err)
}
});