The code is as follows: the entry code to modify the interface and HTML for their own can (the following main display JS section)
<! DOCTYPE html>
<meta charset= "UTF-8" >
<meta name= "viewport" content= "Width=device-width, User-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 ">
<meta name= "referrer" content= "Never" >
<meta http-equiv= "x-ua-compatible" content= "Ie=edge" >
<script src= ". /.. /.. /static/js/common/jquery.js "></script>
<!--pull-up loads more-
<link rel= "stylesheet" href= "Http://topmdrt-static.oss-cn-shenzhen.aliyuncs.com/static/css/common/dropload.css"/>
<script src= "http://topmdrt-static.oss-cn-shenzhen.aliyuncs.com/static/js/common/" ></script>
<title> pull-up loads more </title>
<body>
<div class= "content_02" >
<div class= "lists" >
<!--<a href= "javascript:;" >
<div class= "Free_content_box overh" >
<div class= "fl Left" ></div>
<div class= "FL Mid" >
<p class= "title" >10 Safe Travel Insurance </p>
<p class= "Age" >:18-79   insured: 100,000    coverage period: 30 days </p>
<p class= "More Overh" >
<a class= "FL" href= "javascript:;" > Required Gold: 5 Gold </a>
<a class= "fr under" href= "javascript:;" ><span class= "un" > View details </span> ></a>
</p>
</div>
</div>
</a>-->
</div>
</div>
<script type= "Text/javascript";
//pull-up loads more
var page = 0;
$ ('. content_02 '). Dropload ({
Scrollarea:window,
Domdown: {
Domclass: ' Dropload-down ',
Domrefresh: ' <div class= "Dropload-refresh" >↑ pull-up load more </div> ',
Domload: ' <div class= ' dropload-load ' > Loading </ Div> ',
Domnodata: ' <div class= ' dropload-nodata ' > Loaded complete </div> '
},
Loaddownfn:function (Me) {
Console.log (' 666 ')
page++;//per request, page number plus 1
//Get product Information list render
var data = {
"page": page,
"type_id": 1
}
Console.log (page);
//Render list
$.post (' http://fx.topmdrt.com/ZhongMinWang/listProduct ', data, function (res) {
Console.log (res);
var prod = res.data;
if (Res.errcode = = "0") {
var result = ';
for (var i = 0; i < prod.products.length; i++) {
Result + = ' <a>kai</a> '
if (Prod.products.length < 5 && i = = prod.products.length-1) {
Lock prod.products.length here to change your own length
Me.lock ();
Countless data
Me.nodata ();
Break
}
}
For testing, delay 1 seconds to load
SetTimeout (function () {
$ ('. Lists '). Append (result);
Each time the data is loaded, it must be reset
Me.resetload ();
}, 1000);
} else if (Res.errcode = = "1002") {
$ (". Dropload-down"). Hide ();
Console.log (RES.ERRMSG);
}
}, ' json ')
Threshold:50
}
})
</script>
</body>
"Front-end" pull-up load more dropload.min.js use