cur_height = 0;
var scroll_top = $(window).scrollTop();
var nextpage = parseInt($('#downmore').data('nextpage'));
cur_height = parseInt($(window).height()) + parseInt(scroll_top);
$(window).scroll(function () {
scroll_top = $(window).scrollTop();
cur_height = parseInt($(window).height()) + parseInt(scroll_top);
nextpage = parseInt($('#downmore').data('nextpage'));
if ($(document).height() - response_size <= cur_height && nextpage > 0 && !is_lock) {
getNextPageData();
}
});
function getNextPageData() {
is_lock = 1;
var str_url = 'https://m.aizhuangtong.com/company/15052_designer/list-12-22-43/';
if (str_url.indexOf('?') != -1) {
str_url += '&';
} else {
str_url += '?';
}
var nextpage = parseInt($('#downmore').data('nextpage'));
if (nextpage > 0) {
$('.load-box').show();
$.get(str_url + 'p=' + nextpage, function (data) {
if (data.nextpage < 0) {
if ($('.tip-more').length == 0) {
$('.load-box').after('没有更多了
');
}
$('.tip-more').show();
}
$('#downmore').data('nextpage', data.nextpage);
$('#downmore').find('ul').append(data.html);
$('.load-box').hide();
is_lock = 0;
});
}
}