...
|
...
|
@@ -73,26 +73,36 @@ navHammer.on('tap', function(e) { |
|
|
$this.addClass('focus');
|
|
|
$curNav.removeClass('focus');
|
|
|
|
|
|
$infos.not('.hide').addClass('hide');
|
|
|
|
|
|
$content = $infos.eq(index);
|
|
|
$content.removeClass('hide');
|
|
|
|
|
|
$curNav = $this;
|
|
|
curType = $this.data('type');
|
|
|
|
|
|
//当未加载数据时去请求数据
|
|
|
if (state[curType].page === 1) {
|
|
|
loadMore($content, state[curType]);
|
|
|
}
|
|
|
|
|
|
//重置当前Tab的load-more
|
|
|
if (state[curType].end) {
|
|
|
//无数据时隐藏正在加载和没有更多字样
|
|
|
$loading.addClass('hide');
|
|
|
$noMore.removeClass('hide');
|
|
|
} else {
|
|
|
$loading.removeClass('hide');
|
|
|
$noMore.addClass('hide');
|
|
|
|
|
|
loadMore($content, state[curType]);
|
|
|
} else {
|
|
|
|
|
|
//重置当前Tab的load-more
|
|
|
if (state[curType].end) {
|
|
|
$loading.addClass('hide');
|
|
|
$noMore.removeClass('hide');
|
|
|
} else {
|
|
|
$loading.removeClass('hide');
|
|
|
$noMore.addClass('hide');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$infos.not('.hide').addClass('hide');
|
|
|
$content.removeClass('hide');
|
|
|
|
|
|
if (state[curType].page === 1) {
|
|
|
window.rePosFooter();//进入空内容时重新定位footer位置
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
|