Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
4 changed files
with
22 additions
and
15 deletions
@@ -71,8 +71,8 @@ $('#search').on('touchend', function() { | @@ -71,8 +71,8 @@ $('#search').on('touchend', function() { | ||
71 | 71 | ||
72 | if (historys && historys.length > 0) { | 72 | if (historys && historys.length > 0) { |
73 | historys = historys.split(ranToken); | 73 | historys = historys.split(ranToken); |
74 | - for (i = 0; i < historys.length; i++) { | ||
75 | - history = historys[i]; | 74 | + for (i = historys.length; i > 0; i--) { |
75 | + history = historys[i - 1]; | ||
76 | 76 | ||
77 | if (history === '') { | 77 | if (history === '') { |
78 | continue; | 78 | continue; |
@@ -14,15 +14,19 @@ var recommendSwiper, | @@ -14,15 +14,19 @@ var recommendSwiper, | ||
14 | 14 | ||
15 | if (preferenceUrl) { | 15 | if (preferenceUrl) { |
16 | $.get(preferenceUrl).then(function(html) { | 16 | $.get(preferenceUrl).then(function(html) { |
17 | - $recommendForYou.html(html).show(); | ||
18 | - if ($('#swiper-recommend').length) { | ||
19 | - recommendSwiper = new Swiper('#swiper-recommend', { | ||
20 | - slidesPerView: 'auto', | ||
21 | - grabCursor: true, | ||
22 | - slideElement: 'a', | ||
23 | - lazyLoading: true, | ||
24 | - watchSlidesVisibility: true | ||
25 | - }); | 17 | + if (html.length < 5) { |
18 | + $recommendForYou.css('display', 'none'); | ||
19 | + } else { | ||
20 | + $recommendForYou.html(html).show(); | ||
21 | + if ($('#swiper-recommend').length) { | ||
22 | + recommendSwiper = new Swiper('#swiper-recommend', { | ||
23 | + slidesPerView: 'auto', | ||
24 | + grabCursor: true, | ||
25 | + slideElement: 'a', | ||
26 | + lazyLoading: true, | ||
27 | + watchSlidesVisibility: true | ||
28 | + }); | ||
29 | + } | ||
26 | } | 30 | } |
27 | 31 | ||
28 | window.rePosFooter(); | 32 | window.rePosFooter(); |
@@ -402,6 +402,7 @@ $basicBtnC:#eb0313; | @@ -402,6 +402,7 @@ $basicBtnC:#eb0313; | ||
402 | z-index: 2; | 402 | z-index: 2; |
403 | padding: pxToRem(20px) pxToRem(28px); | 403 | padding: pxToRem(20px) pxToRem(28px); |
404 | text-align: center; | 404 | text-align: center; |
405 | + border-top: 1px solid $borderC; | ||
405 | a { | 406 | a { |
406 | display: inline-block; | 407 | display: inline-block; |
407 | &.num-incart { | 408 | &.num-incart { |
@@ -447,9 +448,9 @@ $basicBtnC:#eb0313; | @@ -447,9 +448,9 @@ $basicBtnC:#eb0313; | ||
447 | } | 448 | } |
448 | } | 449 | } |
449 | } | 450 | } |
450 | - // .recommend-for-you { | ||
451 | - // margin-bottom: pxToRem(30px); | ||
452 | - // } | 451 | + .recommend-for-you{ |
452 | + border-bottom: none; | ||
453 | + } | ||
453 | .yoho-tip{ | 454 | .yoho-tip{ |
454 | top:40%; | 455 | top:40%; |
455 | } | 456 | } |
-
Please register or login to post a comment