paging.js插件翻页

在需要添加分页的地方添加以下html代码:

1. <div id="page"></div>

js代码:

1. $("#page").paging({
2.         pageNo: that.page, // 传入初始
3.         totalPage: that.totalPage, //传入总页数
4.         totalSize: that.pageSize,
5.         callback: function (num) {
6.             // 回调页数
7.             // console.log(num)
8.             $.ajax({
9.                 url: {:url('api/Details/getTeamcaselist')}?id=${that.id},
10.                 type: "post",
11.                 data: {
12.                     page: num
13.                 },
14.                 success: function (res) {
15.                     // console.log(res)
16.                     if (res.status == 200) {
17.                         that.dList = res.res;
18.                     } else {
19.                         alert('没有数据');
20.                     }
21.                 }
22.             })
23.         }
24.     })