This repository was archived by the owner on Jan 17, 2018. It is now read-only.
forked from eva990417744/message
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (54 loc) · 1.73 KB
/
index.html
File metadata and controls
54 lines (54 loc) · 1.73 KB
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>网维自家的留言板 >ω<</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<script src="jquery/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="vue/vue.min.js"></script>
<script src="js/app.js"></script>
<script src="js/api.js"></script>
<script src="js/domutil.js"></script>
<script src="jquery/jquery.ns-autogrow.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="css/app.css">
</head>
<div id="comments"></div>
<div class="no-more" style="display: none">
已经没有更多了哦~ >ω<
</div>
</body>
<!--TEST CASE-->
<script>
var currentPage = -1;
$.ajaxSetup({
async: false
});
$.get("part/comment.part.html", function (data) {
$(data).prependTo('#comments');
});
$.get("part/nav.part.html", function (data) {
$(data).prependTo('body');
});
api.onFetch = App.onFetchComment;
api.fetch(++currentPage);
$(document).ready(function () {
var loading = false;
$(window).scroll(function () {
if (!loading && ($(window).scrollTop() >= $(document).height() - $(window).height() - 10 )) {
loading = true;
if (currentPage == totalPage - 1) {
$(this).unbind('scroll');
$('.no-more').css('display', '');
return;
}
api.fetch(++currentPage);
loading = false;
}
});
App.init();
});
</script>
<!--TEST CASE END-->
</html>