You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ListIndex.js 1.1 KiB

12345678910111213141516171819202122232425262728293031323334353637
  1. 
  2. $(function () {
  3. "use strict";
  4. new Swiper('.lr-site-swiper-container', {
  5. direction: 'horizontal',
  6. autoplay: true,
  7. loop: true,
  8. speed: 600,
  9. // 分页器
  10. pagination: {
  11. el: '.swiper-pagination',
  12. clickable: true
  13. },
  14. });
  15. laypage({
  16. cont: "lr_page", //容器。值支持id名、原生dom对象,jquery对象。【如该容器为】:<div id="page1"></div>
  17. pages: 10, //通过后台拿到的总页数
  18. curr: 0, //当前页
  19. groups: 5, //连续显示分页数
  20. skip: true, //是否开启跳页
  21. first: '首页', //若不显示,设置false即可
  22. last: '尾页', //若不显示,设置false即可
  23. jump: function (obj, first) { //触发分页后的回调
  24. return;
  25. if (!first) { //点击跳页触发函数自身,并传递当前页:obj.curr
  26. pageIndex = obj.curr;
  27. pageQuery(pageIndex);
  28. document.getElementById('newlist').innerHTML = newsDate(data.rows);
  29. }
  30. }
  31. });
  32. });