function loadNews(currIndex) {
var currNum; //当前页码
$("#page").html('');
var str = $('<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">\n' +
' <legend>资讯信息</legend>\n' +
' </fieldset>\n' +
'<table id="news" lay-filter="test"></table>');
$("#page").append(str);
//table 表格
table.render({
elem: '#news'
, limit: 10
, limits: [10, 20, 30]
, page: {curr: currIndex}
, url: ctx + '/news' //数据接口
, where: {opr: 'getPageList'} //传输额外的参数
, parseData: function (res) { //res 即为原始返回的数据
return {
"code": res.status, //解析接口状态
layui框架table删除/返回操作刷新数据在当前页
最新推荐文章于 2024-07-24 18:20:33 发布