Authored by ccbikai

merge code

@@ -33,8 +33,9 @@ function downLoadApp() { @@ -33,8 +33,9 @@ function downLoadApp() {
33 // }); 33 // });
34 // }); 34 // });
35 35
36 -floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]);  
37 -floatLayerCloseHammer.on('tap', function(e) { 36 +if ($('#float-layer-close') && $('#float-layer-close')[0]) {
  37 + floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]);
  38 + floatLayerCloseHammer.on('tap', function(e) {
38 $('#float-layer-app').hide(); 39 $('#float-layer-app').hide();
39 window.setCookie('_float-layer-app', 'id490655927', 40 window.setCookie('_float-layer-app', 'id490655927',
40 { 41 {
@@ -45,20 +46,22 @@ floatLayerCloseHammer.on('tap', function(e) { @@ -45,20 +46,22 @@ floatLayerCloseHammer.on('tap', function(e) {
45 domain: '.yohobuy.com', 46 domain: '.yohobuy.com',
46 expires: 1 47 expires: 1
47 }); 48 });
48 -}); 49 + });
  50 +}
49 51
50 // $('#float-layer-btn').tap(function () { 52 // $('#float-layer-btn').tap(function () {
51 // downLoadApp('bottom'); 53 // downLoadApp('bottom');
52 // }); 54 // });
53 55
54 -floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]);  
55 -floatLayerBtnHammer.on('tap', function(e) { 56 +if ($('#float-layer-btn') && $('#float-layer-btn')[0]) {
  57 + floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]);
  58 + floatLayerBtnHammer.on('tap', function(e) {
56 downLoadApp('bottom'); 59 downLoadApp('bottom');
57 -}); 60 + });
58 61
59 -if (!window.cookie('_float-layer-app')) { 62 + if (!window.cookie('_float-layer-app')) {
60 $('#float-layer-app').show(); 63 $('#float-layer-app').show();
61 -} else { 64 + } else {
62 $('#float-layer-app').hide(); 65 $('#float-layer-app').hide();
  66 + }
63 } 67 }
64 -  
1 -@import "new-arrival", "discount", "list", "detail";  
  1 +@import "new-arrival", "discount", "list", "detail", "suspend-cart";
  1 +.suspend-cart {
  2 + position: fixed;
  3 + width: 44px;
  4 + height: 44px;
  5 + line-height: 44px;
  6 + border-radius: 50%;
  7 + background: rgba(0,0,0,0.3);
  8 + text-align: center;
  9 + right: 15px;
  10 + bottom: 70px;
  11 + z-index: 10;
  12 +
  13 + .iconfont {
  14 + color: #fff;
  15 + font-size: 22px;
  16 + }
  17 +
  18 + .cart-count {
  19 + position: absolute;
  20 + width: 18px;
  21 + height: 18px;
  22 + line-height: 18px;
  23 + border-radius: 50%;
  24 + background: #f00;
  25 + top: 0;
  26 + right: 0;
  27 + color: #fff;
  28 + }
  29 +}
@@ -120,4 +120,6 @@ @@ -120,4 +120,6 @@
120 {{#if query}} 120 {{#if query}}
121 <input id="query" type="hidden" value={{query}}> 121 <input id="query" type="hidden" value={{query}}>
122 {{/if}} 122 {{/if}}
  123 +
  124 + {{> product/suspend-cart}}
123 {{/ goodList}} 125 {{/ goodList}}
  1 +<div id="suspend-cart" class="suspend-cart">
  2 + <a href={{cartUrl}}>
  3 + <span class="iconfont">&#xe62c;</span>
  4 + </a>
  5 + <span class="cart-count hide">1</span>
  6 +</div>