Authored by xuqi

rmb icon & nav hammer

@@ -4,14 +4,18 @@ @@ -4,14 +4,18 @@
4 * @date: 2015/10/20 4 * @date: 2015/10/20
5 */ 5 */
6 6
7 -var $ = require('jquery'); 7 +var $ = require('jquery'),
  8 + Hammer = require('yoho.hammer');
8 9
9 var $cartContent = $('.cart-content'); 10 var $cartContent = $('.cart-content');
10 11
  12 +var navHammer;
  13 +
11 require('./good'); 14 require('./good');
12 15
13 -$('.cart-nav').delegate('li', 'tap', function() {  
14 - var $this = $(this); 16 +navHammer = new Hammer(document.getElementsByClassName('cart-nav')[0]);
  17 +navHammer.on('tap', function(e) {
  18 + var $this = $(e.target).closest('li');
15 19
16 if ($this.hasClass('active')) { 20 if ($this.hasClass('active')) {
17 return; 21 return;
@@ -8,14 +8,14 @@ @@ -8,14 +8,14 @@
8 padding-bottom: 120rem / $pxConvertRem; 8 padding-bottom: 120rem / $pxConvertRem;
9 9
10 .cart-nav { 10 .cart-nav {
11 - height: 30rem / $pxConvertRem;  
12 color: #c6c6c6; 11 color: #c6c6c6;
13 border-bottom: 1px solid #e0e0e0; 12 border-bottom: 1px solid #e0e0e0;
14 - padding: 30rem / $pxConvertRem 0;  
15 13
16 li { 14 li {
17 float: left; 15 float: left;
18 width: 50%; 16 width: 50%;
  17 + padding: 30rem / $pxConvertRem 0;
  18 + height: 30rem / $pxConvertRem;
19 } 19 }
20 20
21 li.active { 21 li.active {
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="shopping-cart-page yoho-page"> 2 <div class="shopping-cart-page yoho-page">
3 {{# shoppingCart}} 3 {{# shoppingCart}}
4 {{#if cartNav}} 4 {{#if cartNav}}
5 - <ul class="cart-nav"> 5 + <ul class="cart-nav clearfix">
6 <li class="active"> 6 <li class="active">
7 <span> 7 <span>
8 普通商品({{commonGoodsCount}}) 8 普通商品({{commonGoodsCount}})
@@ -32,14 +32,14 @@ @@ -32,14 +32,14 @@
32 <div class="price-compute"> 32 <div class="price-compute">
33 <p class="sum-price"> 33 <p class="sum-price">
34 <span class="title">总价</span> 34 <span class="title">总价</span>
35 - {{price}} 35 + ¥{{price}}
36 </p> 36 </p>
37 <p class="activity-price"> 37 <p class="activity-price">
38 <span class="title"> 38 <span class="title">
39 活动价 39 活动价
40 <i class="minus">-</i> 40 <i class="minus">-</i>
41 </span> 41 </span>
42 - {{activityPrice}} 42 + ¥{{activityPrice}}
43 </p> 43 </p>
44 </div> 44 </div>
45 45
@@ -47,11 +47,11 @@ @@ -47,11 +47,11 @@
47 <span class="iconfont icon-cb-checked"></span> 47 <span class="iconfont icon-cb-checked"></span>
48 <p> 48 <p>
49 <span> 49 <span>
50 - {{count}}件总计:{{sumPrice}} 50 + {{count}}件总计:¥{{sumPrice}}
51 </span> 51 </span>
52 <span class="tip">(不含运费)</span> 52 <span class="tip">(不含运费)</span>
53 </p> 53 </p>
54 <button class="btn-balance"> 54 <button class="btn-balance">
55 结算 55 结算
56 </button> 56 </button>
57 - </div>  
  57 +</div>
@@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
6 <div class="text-info"> 6 <div class="text-info">
7 <p class="name">{{name}}</p> 7 <p class="name">{{name}}</p>
8 <p class="price"> 8 <p class="price">
9 - <span class="sale-price{{^price}} no-price{{/price}}">{{salePrice}}</span> 9 + <span class="sale-price{{^price}} no-price{{/price}}">¥{{salePrice}}</span>
10 {{#if price}} 10 {{#if price}}
11 - <span class="market-price">{{price}}</span> 11 + <span class="market-price">¥{{price}}</span>
12 {{/if}} 12 {{/if}}
13 </p> 13 </p>
14 </div> 14 </div>
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </p> 20 </p>
21 <p class="row"> 21 <p class="row">
22 <span class="price"> 22 <span class="price">
23 - {{price}} 23 + ¥{{price}}
24 </span> 24 </span>
25 <span class="count"> 25 <span class="count">
26 ×{{count}} 26 ×{{count}}
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 </p> 25 </p>
26 <p class="row"> 26 <p class="row">
27 <span class="price"> 27 <span class="price">
28 - {{price}} 28 + ¥{{price}}
29 </span> 29 </span>
30 <span class="count"> 30 <span class="count">
31 ×{{count}} 31 ×{{count}}