lee 1899 0 2017-06-15 18:36:33

文章位置:左搜> 编程技术> 正文
$('#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;
        }
    });