This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyzm.html
108 lines (91 loc) · 3.01 KB
/
yzm.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>展示项目平台</title>
<link rel="stylesheet" href="lib/css/bootstrap.min.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<div>
<div class="navs">
<ul class="nav nav-pills">
<li role="presentation"><a href="index.html">斗图</a></li>
<li role="presentation"><a href="company.html">公司列表</a></li>
<li role="presentation " class="active"><a href="yzm.html">50W验证码查看平台</a></li>
<li role="presentation"><a href="achievement.html">我们的成果</a></li>
</ul>
</div>
<div class="content">
<div class="list-group dt-box ">
<div class="dta-box">
</div>
</div>
<nav aria-label="Page navigation">
<ul class="pagination pagination-lg" id="page">
</ul>
</nav>
</div>
</div>
</body>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="lib/js/bootstrap.min.js"></script>
<script src="js/bootstrap-paginator.js"></script>
<script>
$(function () {
load(1);
var page='';
var max='';
function load(page) {
var html = '';
$.ajax({
url: 'http://123.57.108.42:8888/ai_code?page=' + page + '&limit=20',
dataType: "JSON",
contentType: "application/json;charset=utf-8",
type: 'get',
success: function (data) {
res = data.data;
var totalPages=data.count;
for (var i = 0; i <= res.length; i++) {
try {
console.log(res[i].id)
html += '<a href="javascript:;" class="col-xs-6 col-sm-3">\
<img src="' + res[i].img + ' " alt="'+ res[i].id+'" > </a>'
} catch (error) {
}
}
$('.dta-box').html(html)
var element = $('#page');
var options = {
bootstrapMajorVersion : 3,
currentPage : page, // 当前页数
numberOfPages : 20, // 显示按钮的数量
totalPages : totalPages, // 总页数
itemTexts : function(type, page, current) {
switch (type) {
case "first":
return "首页";
case "prev":
return "上一页";
case "next":
return "下一页";
case "last":
return "末页";
case "page":
return page;
}
},
// 点击事件,用于通过Ajax来刷新整个list列表
onPageClicked : function(event, originalEvent, type, page) {
load(page);
}
};
element.bootstrapPaginator(options);
//最大页数,查到的最大页数交个默认的最大页数
}
});
}
})
</script>
</html>