网络编程 发布日期:2025/11/15 浏览次数:1
随着互联网时代的发展,web前端已经和后台数据挂钩,作为web前端仅仅不是只切图写写html,css 和简单js交互。
js code
$(function() {
var page = 1;
var discount = $('#discount');
var innerHeight = window.innerHeight;
var timer2 = null;
$.ajax({
url: '/lightapp/marketing/verify/apply/list"consume-whole">');
arrText.push('<h3>' + t.title + '</h3>');
if (t.coupon_type == 1 ) {
arrText.push('<p>金额:¥' + t.amount + '</p>');
} else {
arrText.push('<p>优惠:' + t.amount + '</p>');
}
arrText.push('<p><span class="hx-user">用户:s账户飒飒是是是啊啊12' + t.user_name +'</span>' + '<span>核销时间:' + t.use_time + '</span></p>');
arrText.push('</div>');
}
discount.html(arrText.join(''));
};
var ajax_getting = false;
$(window).scroll(function() {
clearTimeout(timer2);
timer2 = setTimeout(function() {
var scrollTop = $(document.body).scrollTop();
var scrollHeight = $('body').height();
var windowHeight = innerHeight;
var scrollWhole = Math.max(scrollHeight - scrollTop - windowHeight);
if (scrollWhole < 100) {
if (ajax_getting) {
return false;
} else {
ajax_getting = true;
}
discount.append('<div class="load"><img src="/UploadFiles/2021-04-02/load.gif">
以上所述就是本文的全部内容了,希望大家能够喜欢。