Authored by 梁志锋

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -7,7 +7,10 @@ @@ -7,7 +7,10 @@
7 Swiper = require('yoho.iswiper'), 7 Swiper = require('yoho.iswiper'),
8 lazyLoad = require('yoho.lazyload'); 8 lazyLoad = require('yoho.lazyload');
9 9
10 -var goodsSwiper; 10 +var goodsSwiper,
  11 + $discountFolder = $('.goods-discount .discount-folder'),
  12 + $discountArrow = $('.goodsDiscount .first-item span');
  13 +
11 14
12 require('./desc'); 15 require('./desc');
13 require('./comments-consults'); 16 require('./comments-consults');
@@ -29,18 +32,18 @@ goodsSwiper = new Swiper('.banner-swiper', { @@ -29,18 +32,18 @@ goodsSwiper = new Swiper('.banner-swiper', {
29 32
30 //初始化goods-discount 33 //初始化goods-discount
31 if (0 === $('.goods-discount .discount-folder').children().length) { 34 if (0 === $('.goods-discount .discount-folder').children().length) {
32 - $('.goods-discount .discount-folder').css('display', 'none');  
33 - $('.goods-discount .first-item span').html(''); 35 + $discountFolder.css('display', 'none');
  36 + $discountArrow.html('');
34 } 37 }
35 38
36 //goods-discount下拉按钮点击事件 39 //goods-discount下拉按钮点击事件
37 $('.goodsDiscount .dropdown').on('click', function() { 40 $('.goodsDiscount .dropdown').on('click', function() {
38 - if ($('.goodsDiscount .discount-folder').is(':hidden')) {  
39 - $('.goodsDiscount .first-item span').removeClass('icon-down').addClass('icon-up').html('');  
40 - $('.goodsDiscount .discount-folder').slideDown(); 41 + if ($discountFolder.is(':hidden')) {
  42 + $discountArrow.removeClass('icon-down').addClass('icon-up').html('');
  43 + $discountFolder.slideDown();
41 } else { 44 } else {
42 - $('.goodsDiscount .first-item span').removeClass('icon-up').addClass('icon-down').html('');  
43 - $('.goodsDiscount .discount-folder').slideUp(); 45 + $discountArrow.removeClass('icon-up').addClass('icon-down').html('');
  46 + $discountFolder.slideUp();
44 } 47 }
45 }); 48 });
46 require('./like'); 49 require('./like');
@@ -104,7 +104,7 @@ $basicBtnC:#eb0313; @@ -104,7 +104,7 @@ $basicBtnC:#eb0313;
104 font-size: pxToRem(18px); 104 font-size: pxToRem(18px);
105 text-align: center; 105 text-align: center;
106 line-height: pxToRem(30px); 106 line-height: pxToRem(30px);
107 - padding: 0 15px; 107 + padding: 0 8px;
108 } 108 }
109 .new-tag { 109 .new-tag {
110 background-color: #78dc7e; 110 background-color: #78dc7e;