如何使用?
1. 引入js代码
<script type="text/javascript"> var curUrl="{:url('user/index',$param)}"; layui.use(['laypage', 'layer'], function() { var laypage = layui.laypage , layer = layui.layer; laypage.render({ elem: 'pages' ,count: {$total} ,limit: {$limit} ,curr: {$page} ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] ,jump: function(obj,first){ if(!first){ location.href = curUrl.replace('%7Bpage%7D',obj.curr).replace('%7Blimit%7D',obj.limit); } } }); }); </script>