...
|
...
|
@@ -37,12 +37,13 @@ exports.init = function() { |
|
|
|
|
|
//文字截取
|
|
|
ellipsis.init();
|
|
|
setTimeout(function(){
|
|
|
setTimeout(function() {
|
|
|
$intro.mlellipsis(4); //品牌介绍
|
|
|
$('.info-block-content').each(function(){ //相关文章
|
|
|
$('.info-block-content').each(function() { //相关文章
|
|
|
$(this).mlellipsis(2);
|
|
|
});
|
|
|
},0)
|
|
|
}, 0);
|
|
|
|
|
|
//lazyload
|
|
|
$('img.lazy').lazyload();
|
|
|
|
...
|
...
|
@@ -72,14 +73,7 @@ exports.init = function() { |
|
|
|
|
|
if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) {
|
|
|
//loadData
|
|
|
if (dataEnd) {
|
|
|
//下次下拉时不显示加载图片以及不加载数据
|
|
|
$loading.addClass('hide');
|
|
|
$noMore.removeClass('hide');
|
|
|
} else {
|
|
|
$loading.removeClass('hide');
|
|
|
$noMore.addClass('hide')
|
|
|
|
|
|
if (!dataEnd) {
|
|
|
count = $infoContent.children('.info-block').length;
|
|
|
canScroll = false;
|
|
|
$.ajax({
|
...
|
...
|
@@ -95,6 +89,9 @@ exports.init = function() { |
|
|
if (data.success) {
|
|
|
if (data.end) {
|
|
|
dataEnd = true;
|
|
|
|
|
|
$loading.addClass('hide');
|
|
|
$noMore.removeClass('hide');
|
|
|
}
|
|
|
res = data.data;
|
|
|
for (i = 0; i < res.length; i++) {
|
...
|
...
|
|