Merge branch 'feature/new-product-detail' of http://git.yoho.cn/fe/yohobuy-node …
…into feature/new-product-detail
Showing
2 changed files
with
27 additions
and
7 deletions
@@ -30,6 +30,7 @@ var $main = $('.main'), | @@ -30,6 +30,7 @@ var $main = $('.main'), | ||
30 | secKill = $main.data('seckill') === 'Y', | 30 | secKill = $main.data('seckill') === 'Y', |
31 | limitCode = $main.data('limitcode'); | 31 | limitCode = $main.data('limitcode'); |
32 | 32 | ||
33 | +var maxStock = -1; // 记录当前选中的颜色-尺码的库存量,若为-1,代表未选择尺码 | ||
33 | var SLIDETIME = 200; | 34 | var SLIDETIME = 200; |
34 | 35 | ||
35 | var colTxt = { | 36 | var colTxt = { |
@@ -97,7 +98,7 @@ bindEvent.add(function() { | @@ -97,7 +98,7 @@ bindEvent.add(function() { | ||
97 | 98 | ||
98 | var isTicket = $('input[name="isTicket"]').length > 0 && $('input[name="isTicket"]').val() === 'true'; | 99 | var isTicket = $('input[name="isTicket"]').length > 0 && $('input[name="isTicket"]').val() === 'true'; |
99 | 100 | ||
100 | - var maxStock = -1; // 记录当前选中的颜色-尺码的库存量,若为-1,代表未选择尺码 | 101 | + |
101 | 102 | ||
102 | var brandDomain = $('.home').attr('href'); | 103 | var brandDomain = $('.home').attr('href'); |
103 | 104 | ||
@@ -1474,11 +1475,13 @@ $('.bottom-tab').on('click', '.bottom-title', function() { | @@ -1474,11 +1475,13 @@ $('.bottom-tab').on('click', '.bottom-title', function() { | ||
1474 | // 店铺推荐 | 1475 | // 店铺推荐 |
1475 | $recommendComment.slideDown(SLIDETIME); | 1476 | $recommendComment.slideDown(SLIDETIME); |
1476 | $latestWalk.slideUp(SLIDETIME); | 1477 | $latestWalk.slideUp(SLIDETIME); |
1478 | + $('.change').css('display','inline-block'); | ||
1477 | } else { | 1479 | } else { |
1478 | // 最近游览 | 1480 | // 最近游览 |
1479 | fetchLatestWalk(); // eslint-disable-line | 1481 | fetchLatestWalk(); // eslint-disable-line |
1480 | $recommendComment.slideUp(SLIDETIME); | 1482 | $recommendComment.slideUp(SLIDETIME); |
1481 | $latestWalk.slideDown(SLIDETIME); | 1483 | $latestWalk.slideDown(SLIDETIME); |
1484 | + $('.change').css('display','none'); | ||
1482 | } | 1485 | } |
1483 | 1486 | ||
1484 | }); | 1487 | }); |
@@ -1589,6 +1592,16 @@ $('.redcar').on('click', '.option', function() { | @@ -1589,6 +1592,16 @@ $('.redcar').on('click', '.option', function() { | ||
1589 | $this.addClass('fixed'); | 1592 | $this.addClass('fixed'); |
1590 | }); | 1593 | }); |
1591 | 1594 | ||
1595 | +$('.redcar').on('click', function(){ | ||
1596 | + var $addToCart = $('#add-to-cart'); | ||
1597 | + var sc = $(document); | ||
1598 | + if(maxStock === -1){ | ||
1599 | + sc.scrollTop(0); | ||
1600 | + }else{ | ||
1601 | + $addToCart.trigger('click'); | ||
1602 | + } | ||
1603 | +}); | ||
1604 | + | ||
1592 | $(function() { | 1605 | $(function() { |
1593 | $('.bottom-tab .change').click(function() { | 1606 | $('.bottom-tab .change').click(function() { |
1594 | $('.img-brand-switch .next').trigger('click'); | 1607 | $('.img-brand-switch .next').trigger('click'); |
@@ -748,6 +748,7 @@ | @@ -748,6 +748,7 @@ | ||
748 | padding-bottom: 30px; | 748 | padding-bottom: 30px; |
749 | border-left: 1px solid #eaeceb; | 749 | border-left: 1px solid #eaeceb; |
750 | border-right: 1px solid #eaeceb; | 750 | border-right: 1px solid #eaeceb; |
751 | + border-bottom: 1px solid #eaeceb; | ||
751 | width: 980px; | 752 | width: 980px; |
752 | float: left; | 753 | float: left; |
753 | 754 | ||
@@ -842,7 +843,7 @@ | @@ -842,7 +843,7 @@ | ||
842 | .fixednav{ | 843 | .fixednav{ |
843 | 844 | ||
844 | position: fixed; | 845 | position: fixed; |
845 | - top:-30px; | 846 | + top:0px; |
846 | margin-left: 982px; | 847 | margin-left: 982px; |
847 | } | 848 | } |
848 | 849 | ||
@@ -850,7 +851,6 @@ | @@ -850,7 +851,6 @@ | ||
850 | background-color: #f5f5f5; | 851 | background-color: #f5f5f5; |
851 | float: left; | 852 | float: left; |
852 | height: 240px; | 853 | height: 240px; |
853 | - margin-top: 30px; | ||
854 | width: 165px; | 854 | width: 165px; |
855 | border-right: 1px solid #eaeceb; | 855 | border-right: 1px solid #eaeceb; |
856 | height: 1000px; | 856 | height: 1000px; |
@@ -919,10 +919,17 @@ | @@ -919,10 +919,17 @@ | ||
919 | 919 | ||
920 | } | 920 | } |
921 | 921 | ||
922 | + #goodsMessage{ | ||
923 | + margin-top: 0; | ||
924 | + margin-left: 0; | ||
925 | + margin-right: 0; | ||
926 | + } | ||
922 | 927 | ||
923 | 928 | ||
924 | .info-block { | 929 | .info-block { |
925 | margin-top: 30px; | 930 | margin-top: 30px; |
931 | + margin-left: 40px; | ||
932 | + margin-right: 40px; | ||
926 | color: #999; | 933 | color: #999; |
927 | border-top: 2px solid #eaeceb; | 934 | border-top: 2px solid #eaeceb; |
928 | font-size: 12px; | 935 | font-size: 12px; |
@@ -971,7 +978,7 @@ | @@ -971,7 +978,7 @@ | ||
971 | } | 978 | } |
972 | 979 | ||
973 | .info-bootom { | 980 | .info-bootom { |
974 | - margin-top: 0px; | 981 | + margin: 0px; |
975 | } | 982 | } |
976 | 983 | ||
977 | #block-title-head { | 984 | #block-title-head { |
@@ -991,7 +998,7 @@ | @@ -991,7 +998,7 @@ | ||
991 | .title { | 998 | .title { |
992 | display: inline-block; | 999 | display: inline-block; |
993 | padding-top: 15px; | 1000 | padding-top: 15px; |
994 | - font-weight: bold; | 1001 | + |
995 | cursor: pointer; | 1002 | cursor: pointer; |
996 | font-size: 16px; | 1003 | font-size: 16px; |
997 | margin-left: auto; | 1004 | margin-left: auto; |
@@ -1954,7 +1961,7 @@ | @@ -1954,7 +1961,7 @@ | ||
1954 | } | 1961 | } |
1955 | .commom-consults{ | 1962 | .commom-consults{ |
1956 | 1963 | ||
1957 | - margin: 10px 40px 10px 40px; | 1964 | + margin: 10px auto; |
1958 | 1965 | ||
1959 | .common-question{ | 1966 | .common-question{ |
1960 | width: 100%; | 1967 | width: 100%; |
@@ -2099,7 +2106,7 @@ | @@ -2099,7 +2106,7 @@ | ||
2099 | padding: 8px 26px; | 2106 | padding: 8px 26px; |
2100 | text-align: center; | 2107 | text-align: center; |
2101 | background-color: #444; | 2108 | background-color: #444; |
2102 | - font-weight: bold; | 2109 | + font-weight: 100; |
2103 | } | 2110 | } |
2104 | } | 2111 | } |
2105 | } | 2112 | } |
-
Please register or login to post a comment