Merge branch 'feature/mBrandShop' of http://git.dev.yoho.cn/web/yohobuywap into feature/mBrandShop
Showing
3 changed files
with
26 additions
and
28 deletions
@@ -9,7 +9,6 @@ var $allProductCell = $('.allproduct'), | @@ -9,7 +9,6 @@ var $allProductCell = $('.allproduct'), | ||
9 | $categoryContainer = $('.category-container'), | 9 | $categoryContainer = $('.category-container'), |
10 | $contents = $categoryContainer.children('.content'), | 10 | $contents = $categoryContainer.children('.content'), |
11 | $subLevelItem = $categoryContainer.find('.sub-level li'), | 11 | $subLevelItem = $categoryContainer.find('.sub-level li'), |
12 | - $primaryItem = $categoryContainer.find('.primary-level li'), | ||
13 | $trilangle = $categoryContainer.find('.primary-level-trilangle'); | 12 | $trilangle = $categoryContainer.find('.primary-level-trilangle'); |
14 | 13 | ||
15 | //初始化container高度 | 14 | //初始化container高度 |
@@ -53,16 +52,15 @@ $categoryContainer.on('touchend', function(e) { | @@ -53,16 +52,15 @@ $categoryContainer.on('touchend', function(e) { | ||
53 | } | 52 | } |
54 | }); | 53 | }); |
55 | 54 | ||
56 | -$categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() { | ||
57 | - $primaryItem.removeClass('highlight'); | 55 | +$categoryContainer.find('.sub-level').on('touchstart', 'li', function() { |
56 | + $subLevelItem.removeClass('highlight'); | ||
58 | $(this).addClass('highlight'); | 57 | $(this).addClass('highlight'); |
59 | }).on('touchend touchcancel', 'li', function() { | 58 | }).on('touchend touchcancel', 'li', function() { |
60 | $(this).removeClass('highlight'); | 59 | $(this).removeClass('highlight'); |
61 | }); | 60 | }); |
62 | 61 | ||
63 | -$categoryContainer.find('.sub-level').on('touchstart', 'li', function() { | ||
64 | - $subLevelItem.removeClass('highlight'); | 62 | +$allProductCell.on('touchstart', function() { |
65 | $(this).addClass('highlight'); | 63 | $(this).addClass('highlight'); |
66 | -}).on('touchend touchcancel', 'li', function() { | 64 | +}).on('touchend touchcancel', function() { |
67 | $(this).removeClass('highlight'); | 65 | $(this).removeClass('highlight'); |
68 | }); | 66 | }); |
@@ -3,12 +3,14 @@ | @@ -3,12 +3,14 @@ | ||
3 | background-color: #fff; | 3 | background-color: #fff; |
4 | 4 | ||
5 | .allproduct { | 5 | .allproduct { |
6 | - position: relative; | 6 | + padding: 0px 30px; |
7 | + display: block; | ||
7 | height: 89px; | 8 | height: 89px; |
8 | line-height: 89px; | 9 | line-height: 89px; |
9 | - background: #fff; | ||
10 | - border-top: 1px solid #e6e6e6; | ||
11 | - margin-left: 30px; | 10 | + |
11 | + &.highlight { | ||
12 | + background: #dbdbdb; | ||
13 | + } | ||
12 | } | 14 | } |
13 | 15 | ||
14 | .margin-under-allproduct{ | 16 | .margin-under-allproduct{ |
@@ -21,11 +23,12 @@ | @@ -21,11 +23,12 @@ | ||
21 | border-top: 1px solid #e6e6e6; | 23 | border-top: 1px solid #e6e6e6; |
22 | } | 24 | } |
23 | .arrow-icon { | 25 | .arrow-icon { |
24 | - position: absolute; | 26 | + position: relative; |
27 | + float: right; | ||
25 | font-size: 30px; | 28 | font-size: 30px; |
26 | top: 0px; | 29 | top: 0px; |
27 | - right: 33px; | ||
28 | color: #e1e1e1; | 30 | color: #e1e1e1; |
31 | + padding: 0px 10px; | ||
29 | } | 32 | } |
30 | 33 | ||
31 | .allproductParagaraph { | 34 | .allproductParagaraph { |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | 2 | ||
3 | <div class="product-category yoho-page"> | 3 | <div class="product-category yoho-page"> |
4 | - | ||
5 | - <div class="allproduct"> | ||
6 | - {{# content}} | ||
7 | - <a href={{allproduct}}> | ||
8 | - {{/ content}} | ||
9 | - 全部商品 | ||
10 | - <i class="arrow-icon iconfont"></i> | 4 | + {{# content}} |
5 | + <a class="allproduct" href="{{allproduct}}"> | ||
6 | + 全部商品 | ||
7 | + <span class="arrow-icon iconfont"> | ||
8 | +  | ||
9 | + </span> | ||
11 | </a> | 10 | </a> |
12 | - </div> | ||
13 | - | ||
14 | - <div class="margin-under-allproduct"> | ||
15 | - </div> | 11 | + |
12 | + <div class="margin-under-allproduct"> | ||
13 | + </div> | ||
16 | 14 | ||
17 | - <div class="category-container clearfix"> | ||
18 | - <div class="content"> | ||
19 | - {{# content}} | 15 | + <div class="category-container clearfix"> |
16 | + <div class="content"> | ||
20 | <ul class="primary-level"> | 17 | <ul class="primary-level"> |
21 | {{# class}} | 18 | {{# class}} |
22 | <li class="p-level-item">{{name}} | 19 | <li class="p-level-item">{{name}} |
@@ -37,8 +34,8 @@ | @@ -37,8 +34,8 @@ | ||
37 | </ul> | 34 | </ul> |
38 | {{/ category}} | 35 | {{/ category}} |
39 | </div> | 36 | </div> |
40 | - {{/ content}} | 37 | + </div> |
41 | </div> | 38 | </div> |
42 | - </div> | 39 | + {{/ content}} |
43 | </div> | 40 | </div> |
44 | {{> layout/footer}} | 41 | {{> layout/footer}} |
-
Please register or login to post a comment