|
@@ -73,26 +73,36 @@ navHammer.on('tap', function(e) { |
|
@@ -73,26 +73,36 @@ 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) {
|
86
|
- loadMore($content, state[curType]);
|
|
|
87
|
- }
|
|
|
88
|
|
83
|
|
89
|
- //重置当前Tab的load-more
|
|
|
90
|
- if (state[curType].end) {
|
84
|
+ //无数据时隐藏正在加载和没有更多字样
|
91
|
$loading.addClass('hide');
|
85
|
$loading.addClass('hide');
|
92
|
- $noMore.removeClass('hide');
|
|
|
93
|
- } else {
|
|
|
94
|
- $loading.removeClass('hide');
|
|
|
95
|
$noMore.addClass('hide');
|
86
|
$noMore.addClass('hide');
|
|
|
87
|
+
|
|
|
88
|
+ loadMore($content, state[curType]);
|
|
|
89
|
+ } else {
|
|
|
90
|
+
|
|
|
91
|
+ //重置当前Tab的load-more
|
|
|
92
|
+ if (state[curType].end) {
|
|
|
93
|
+ $loading.addClass('hide');
|
|
|
94
|
+ $noMore.removeClass('hide');
|
|
|
95
|
+ } else {
|
|
|
96
|
+ $loading.removeClass('hide');
|
|
|
97
|
+ $noMore.addClass('hide');
|
|
|
98
|
+ }
|
|
|
99
|
+ }
|
|
|
100
|
+
|
|
|
101
|
+ $infos.not('.hide').addClass('hide');
|
|
|
102
|
+ $content.removeClass('hide');
|
|
|
103
|
+
|
|
|
104
|
+ if (state[curType].page === 1) {
|
|
|
105
|
+ window.rePosFooter();//进入空内容时重新定位footer位置
|
96
|
}
|
106
|
}
|
97
|
});
|
107
|
});
|
98
|
|
108
|
|