Authored by xuqi

Merge branch 'develop'

... ... @@ -63,6 +63,12 @@ exports.init = function() {
Mustache.parse(tpl);
});
//相关文章截取文字
ellipsis.init();
$('.tag-text, .tag-title').each(function() {
this.mlellipsis(2);
});
//文章点赞
$('#container').delegate('.like-btn', 'touchstart', function(e) {
var $cur = $(e.currentTarget),
... ... @@ -157,18 +163,6 @@ exports.init = function() {
}
});
}
if ($(document).height() === winH) {
//应对初始加载时数据不满屏不能触发scroll的情况
$(document).one('touchmove', function() {
if (!canScroll || dataEnd) {
return;
}
//显示LoadMore
$loading.removeClass('hide');
loadMore();
});
}
$(document).on('scroll', function() {
//正在请求数据或者数据请求结束时返回
... ... @@ -181,15 +175,18 @@ exports.init = function() {
}
});
setTimeout(function() {
//相关文章截取文字
ellipsis.init();
$('.tag-text, .tag-title').each(function() {
this.mlellipsis(2);
});
if ($(document).height() !== winH) {
if ($(document).height() === winH) {
//应对初始加载时数据不满屏不能触发scroll的情况
$(document).one('touchmove', function() {
if (!canScroll || dataEnd) {
return;
}
//显示LoadMore
$loading.removeClass('hide');
}
}, 0);
loadMore();
});
} else {
$loading.removeClass('hide');
}
});
};
\ No newline at end of file
... ...