|
@@ -73,18 +73,20 @@ navHammer.on('tap', function(e) { |
|
@@ -73,18 +73,20 @@ navHammer.on('tap', function(e) { |
73
|
$this.addClass('focus');
|
73
|
$this.addClass('focus');
|
74
|
$curNav.removeClass('focus');
|
74
|
$curNav.removeClass('focus');
|
75
|
|
75
|
|
76
|
- $infos.not('.hide').addClass('hide');
|
|
|
77
|
-
|
|
|
78
|
$content = $infos.eq(index);
|
76
|
$content = $infos.eq(index);
|
79
|
- $content.removeClass('hide');
|
|
|
80
|
|
77
|
|
81
|
$curNav = $this;
|
78
|
$curNav = $this;
|
82
|
curType = $this.data('type');
|
79
|
curType = $this.data('type');
|
83
|
|
80
|
|
84
|
//当未加载数据时去请求数据
|
81
|
//当未加载数据时去请求数据
|
85
|
if (state[curType].page === 1) {
|
82
|
if (state[curType].page === 1) {
|
|
|
83
|
+
|
|
|
84
|
+ //无数据时隐藏正在加载和没有更多字样
|
|
|
85
|
+ $loading.addClass('hide');
|
|
|
86
|
+ $noMore.addClass('hide');
|
|
|
87
|
+
|
86
|
loadMore($content, state[curType]);
|
88
|
loadMore($content, state[curType]);
|
87
|
- }
|
89
|
+ } else {
|
88
|
|
90
|
|
89
|
//重置当前Tab的load-more
|
91
|
//重置当前Tab的load-more
|
90
|
if (state[curType].end) {
|
92
|
if (state[curType].end) {
|
|
@@ -94,6 +96,14 @@ navHammer.on('tap', function(e) { |
|
@@ -94,6 +96,14 @@ navHammer.on('tap', function(e) { |
94
|
$loading.removeClass('hide');
|
96
|
$loading.removeClass('hide');
|
95
|
$noMore.addClass('hide');
|
97
|
$noMore.addClass('hide');
|
96
|
}
|
98
|
}
|
|
|
99
|
+ }
|
|
|
100
|
+
|
|
|
101
|
+ $infos.not('.hide').addClass('hide');
|
|
|
102
|
+ $content.removeClass('hide');
|
|
|
103
|
+
|
|
|
104
|
+ if (state[curType].page === 1) {
|
|
|
105
|
+ window.rePosFooter();//进入空内容时重新定位footer位置
|
|
|
106
|
+ }
|
97
|
});
|
107
|
});
|
98
|
|
108
|
|
99
|
$(document).scroll(function() {
|
109
|
$(document).scroll(function() {
|