|
@@ -7,6 +7,7 @@ |
|
@@ -7,6 +7,7 @@ |
7
|
var $ = require('jquery'),
|
7
|
var $ = require('jquery'),
|
8
|
Hammer = require('yoho.hammer'),
|
8
|
Hammer = require('yoho.hammer'),
|
9
|
Swiper = require('yoho.iswiper'),
|
9
|
Swiper = require('yoho.iswiper'),
|
|
|
10
|
+ loading = require('../plugin/loading'),
|
10
|
lazyLoad = require('yoho.lazyload');
|
11
|
lazyLoad = require('yoho.lazyload');
|
11
|
|
12
|
|
12
|
var swiper,
|
13
|
var swiper,
|
|
@@ -25,6 +26,8 @@ var brandsData, |
|
@@ -25,6 +26,8 @@ var brandsData, |
25
|
$keyword,
|
26
|
$keyword,
|
26
|
clearTextHammer;
|
27
|
clearTextHammer;
|
27
|
|
28
|
|
|
|
29
|
+loading.showLoadingMask();
|
|
|
30
|
+
|
28
|
//热门品牌滑动
|
31
|
//热门品牌滑动
|
29
|
hotBrandsSwiper = new Swiper('.brands-swiper', {
|
32
|
hotBrandsSwiper = new Swiper('.brands-swiper', {
|
30
|
grabCursor: true,
|
33
|
grabCursor: true,
|
|
@@ -47,9 +50,14 @@ $('.yoho-header').css({ |
|
@@ -47,9 +50,14 @@ $('.yoho-header').css({ |
47
|
top: 0
|
50
|
top: 0
|
48
|
});
|
51
|
});
|
49
|
|
52
|
|
50
|
-if ($('.banner-top').length > 0) {
|
53
|
+(function() {
|
|
|
54
|
+ if ($('.banner-top').length > 0) {
|
51
|
$('.hot-brands').css('padding-top', '0');
|
55
|
$('.hot-brands').css('padding-top', '0');
|
52
|
-}
|
56
|
+ }
|
|
|
57
|
+
|
|
|
58
|
+ $('.hide-when-loading').show();
|
|
|
59
|
+ loading.hideLoadingMask();
|
|
|
60
|
+})();
|
53
|
|
61
|
|
54
|
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
|
62
|
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
|
55
|
$fixTitleBar.css({
|
63
|
$fixTitleBar.css({
|
|
@@ -181,8 +189,16 @@ if ($('.brand-search-page').length) { |
|
@@ -181,8 +189,16 @@ if ($('.brand-search-page').length) { |
181
|
|
189
|
|
182
|
if ($genderItem.length > 0) {
|
190
|
if ($genderItem.length > 0) {
|
183
|
$genderItem.on('touchstart', function() {
|
191
|
$genderItem.on('touchstart', function() {
|
|
|
192
|
+ var index = $(this).data('id') + 1;
|
|
|
193
|
+
|
184
|
$('.genderNav ul .active').removeClass('active');
|
194
|
$('.genderNav ul .active').removeClass('active');
|
185
|
$(this).addClass('active');
|
195
|
$(this).addClass('active');
|
186
|
- window.location.search = 'channel=' + ($(this).data('id') + 1);
|
196
|
+ $('.hide-when-loading').hide();
|
|
|
197
|
+ loading.showLoadingMask();
|
|
|
198
|
+ function reload() {
|
|
|
199
|
+ window.location.search = 'channel=' + index;
|
|
|
200
|
+ }
|
|
|
201
|
+ setTimeout(reload.bind(this), 100);
|
187
|
});
|
202
|
});
|
188
|
}
|
203
|
}
|
|
|
204
|
+ |