Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Showing
7 changed files
with
30 additions
and
21 deletions
framework @ 75bbc3b0
@@ -56,10 +56,12 @@ var $listNav = $('#list-nav'), | @@ -56,10 +56,12 @@ var $listNav = $('#list-nav'), | ||
56 | $pre, //纪录进入筛选前的active项 | 56 | $pre, //纪录进入筛选前的active项 |
57 | searching; | 57 | searching; |
58 | 58 | ||
59 | -swiper = new Swiper('.swiper-container', { | ||
60 | - lazyLoading: true, | ||
61 | - pagination: '.swiper-pagination' | ||
62 | -}); | 59 | +if ($('.swiper-container .swiper-slide').length > 1) { |
60 | + swiper = new Swiper('.swiper-container', { | ||
61 | + lazyLoading: true, | ||
62 | + pagination: '.swiper-pagination' | ||
63 | + }); | ||
64 | +} | ||
63 | 65 | ||
64 | /** | 66 | /** |
65 | * 筛选注册的回调,筛选子项点击后逻辑 | 67 | * 筛选注册的回调,筛选子项点击后逻辑 |
@@ -214,7 +216,7 @@ filter.registerCbFn(search); | @@ -214,7 +216,7 @@ filter.registerCbFn(search); | ||
214 | //3.筛选无active时点击展开筛选面板 | 216 | //3.筛选无active时点击展开筛选面板 |
215 | //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 | 217 | //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 |
216 | //5.当前active为筛选并且点击其他项时,隐藏筛选面板 | 218 | //5.当前active为筛选并且点击其他项时,隐藏筛选面板 |
217 | -$listNav.delegate('li', 'tap', function() { | 219 | +$listNav.delegate('li', 'touchstart', function() { |
218 | var $this = $(this), | 220 | var $this = $(this), |
219 | nav, | 221 | nav, |
220 | navType, | 222 | navType, |
@@ -308,8 +310,8 @@ $(window).scroll(function() { | @@ -308,8 +310,8 @@ $(window).scroll(function() { | ||
308 | //当scroll到1/4$goodsContainer高度后继续请求下一页数据 | 310 | //当scroll到1/4$goodsContainer高度后继续请求下一页数据 |
309 | if ($(window).scrollTop() + winH > | 311 | if ($(window).scrollTop() + winH > |
310 | $(document).height() - 0.25 * $goodsContainer.height()) { | 312 | $(document).height() - 0.25 * $goodsContainer.height()) { |
311 | - if ($pre != undefined) { | 313 | + if ($pre !== undefined) { |
312 | search(); | 314 | search(); |
313 | } | 315 | } |
314 | } | 316 | } |
315 | -}); | 317 | +}); |
@@ -59,10 +59,12 @@ var $listNav = $('#list-nav'), | @@ -59,10 +59,12 @@ var $listNav = $('#list-nav'), | ||
59 | $pgc.addClass('hide'); | 59 | $pgc.addClass('hide'); |
60 | $dgc.addClass('hide'); | 60 | $dgc.addClass('hide'); |
61 | 61 | ||
62 | -swiper = new Swiper('.swiper-container', { | ||
63 | - lazyLoading: true, | ||
64 | - pagination: '.swiper-pagination' | ||
65 | -}); | 62 | +if ($('.swiper-container .swiper-slide').length > 1) { |
63 | + swiper = new Swiper('.swiper-container', { | ||
64 | + lazyLoading: true, | ||
65 | + pagination: '.swiper-pagination' | ||
66 | + }); | ||
67 | +} | ||
66 | 68 | ||
67 | /** | 69 | /** |
68 | * 筛选注册的回调,筛选子项点击后逻辑 | 70 | * 筛选注册的回调,筛选子项点击后逻辑 |
@@ -17,14 +17,15 @@ | @@ -17,14 +17,15 @@ | ||
17 | overflow: hidden; | 17 | overflow: hidden; |
18 | 18 | ||
19 | .brand-logo { | 19 | .brand-logo { |
20 | - width: 100%; | 20 | + display: table-cell; |
21 | + width: 3.95rem; | ||
21 | height: 128rem / $pxConvertRem; | 22 | height: 128rem / $pxConvertRem; |
22 | line-height: 128rem / $pxConvertRem; | 23 | line-height: 128rem / $pxConvertRem; |
23 | text-align: center; | 24 | text-align: center; |
24 | font-size: 0; | 25 | font-size: 0; |
26 | + vertical-align: middle; | ||
25 | 27 | ||
26 | img { | 28 | img { |
27 | - vertical-align: middle; | ||
28 | max-width: 100%; | 29 | max-width: 100%; |
29 | max-height: 100%; | 30 | max-height: 100%; |
30 | } | 31 | } |
@@ -68,13 +69,13 @@ | @@ -68,13 +69,13 @@ | ||
68 | .brands-swiper { | 69 | .brands-swiper { |
69 | background: #fff; | 70 | background: #fff; |
70 | width: 100%; | 71 | width: 100%; |
71 | - height: 140rem / $pxConvertRem; | 72 | + height: 180rem / $pxConvertRem; |
72 | margin-bottom: 28rem / $pxConvertRem; | 73 | margin-bottom: 28rem / $pxConvertRem; |
73 | overflow: hidden; | 74 | overflow: hidden; |
74 | 75 | ||
75 | .brands-list { | 76 | .brands-list { |
76 | position: relative; | 77 | position: relative; |
77 | - height: 140rem / $pxConvertRem; | 78 | + height: 180rem / $pxConvertRem; |
78 | 79 | ||
79 | li { | 80 | li { |
80 | float: left; | 81 | float: left; |
@@ -85,11 +86,12 @@ | @@ -85,11 +86,12 @@ | ||
85 | 86 | ||
86 | a { | 87 | a { |
87 | position: relative; | 88 | position: relative; |
88 | - display: block; | 89 | + display: table-cell; |
89 | width: 100%; | 90 | width: 100%; |
90 | - height: 100%; | 91 | + height: 140rem / $pxConvertRem; |
91 | line-height: 140rem / $pxConvertRem; | 92 | line-height: 140rem / $pxConvertRem; |
92 | font-size: 0; | 93 | font-size: 0; |
94 | + vertical-align: middle; | ||
93 | } | 95 | } |
94 | 96 | ||
95 | img { | 97 | img { |
@@ -102,7 +104,8 @@ | @@ -102,7 +104,8 @@ | ||
102 | position: absolute; | 104 | position: absolute; |
103 | left: 8rem / $pxConvertRem; | 105 | left: 8rem / $pxConvertRem; |
104 | right: 8rem / $pxConvertRem; | 106 | right: 8rem / $pxConvertRem; |
105 | - bottom: 8rem / $pxConvertRem; | 107 | + bottom: -32rem / $pxConvertRem; |
108 | + width: 100%; | ||
106 | height: 28rem / $pxConvertRem; | 109 | height: 28rem / $pxConvertRem; |
107 | line-height: 28rem / $pxConvertRem; | 110 | line-height: 28rem / $pxConvertRem; |
108 | text-align: center; | 111 | text-align: center; |
-
Please register or login to post a comment