Showing
5 changed files
with
63 additions
and
23 deletions
@@ -33,32 +33,35 @@ function downLoadApp() { | @@ -33,32 +33,35 @@ function downLoadApp() { | ||
33 | // }); | 33 | // }); |
34 | // }); | 34 | // }); |
35 | 35 | ||
36 | -floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]); | ||
37 | -floatLayerCloseHammer.on('tap', function(e) { | ||
38 | - $('#float-layer-app').hide(); | ||
39 | - window.setCookie('_float-layer-app', 'id490655927', | ||
40 | - { | ||
41 | - domain: '.yohobuy.com' | ||
42 | - }); | ||
43 | - window.setCookie('_float-layer-app-close', 1, | ||
44 | - { | ||
45 | - domain: '.yohobuy.com', | ||
46 | - expires: 1 | ||
47 | - }); | ||
48 | -}); | 36 | +if ($('#float-layer-close') && $('#float-layer-close')[0]) { |
37 | + floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]); | ||
38 | + floatLayerCloseHammer.on('tap', function(e) { | ||
39 | + $('#float-layer-app').hide(); | ||
40 | + window.setCookie('_float-layer-app', 'id490655927', | ||
41 | + { | ||
42 | + domain: '.yohobuy.com' | ||
43 | + }); | ||
44 | + window.setCookie('_float-layer-app-close', 1, | ||
45 | + { | ||
46 | + domain: '.yohobuy.com', | ||
47 | + expires: 1 | ||
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 | - downLoadApp('bottom'); | ||
57 | -}); | 56 | +if ($('#float-layer-btn') && $('#float-layer-btn')[0]) { |
57 | + floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]); | ||
58 | + floatLayerBtnHammer.on('tap', function(e) { | ||
59 | + downLoadApp('bottom'); | ||
60 | + }); | ||
58 | 61 | ||
59 | -if (!window.cookie('_float-layer-app')) { | ||
60 | - $('#float-layer-app').show(); | ||
61 | -} else { | ||
62 | - $('#float-layer-app').hide(); | 62 | + if (!window.cookie('_float-layer-app')) { |
63 | + $('#float-layer-app').show(); | ||
64 | + } else { | ||
65 | + $('#float-layer-app').hide(); | ||
66 | + } | ||
63 | } | 67 | } |
64 | - |
static/sass/product/_suspend-cart.scss
0 → 100644
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 | +} |
-
Please register or login to post a comment