$('#table').bootstrapTable({
columns: [
{
field:'id',
title:'序号'
},{
field: 'name',
title: '名称'
}],
pagination:true,
pageList:[10],
sidePagination:'server',
url:'http://xxx/query.do',
contentType: "application/x-www-form-urlencoded",/**支持跨域**/
method:'GET',
queryParams:queryParams,
responseHandler:function(res){
if(res){
var data={"total":res.data.total,"rows":res.data.rows};
return data;
}
return res.data;
}
});
版权所有 © 【代码谷】 欢迎非商用转载,转载请按下面格式注明出处,商业转载请联系授权,违者必究。(提示:点击下方内容复制出处)
源文:《bootstrap table跨域问题完美解决》,链接:https://www.daimagu.com/article/179.html,来源:【代码谷】
评论