Showing
1 changed file
with
26 additions
and
21 deletions
@@ -37,35 +37,40 @@ function downLoadApp() { | @@ -37,35 +37,40 @@ function downLoadApp() { | ||
37 | // }); | 37 | // }); |
38 | // }); | 38 | // }); |
39 | 39 | ||
40 | -floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]); | ||
41 | -floatLayerCloseHammer.on('tap', function(e) { | ||
42 | - $('#float-layer-app').hide(); | ||
43 | - window.setCookie('_float-layer-app', 'id490655927', | ||
44 | - { | ||
45 | - domain: '.yohobuy.com' | ||
46 | - }); | ||
47 | - window.setCookie('_float-layer-app-close', 1, | ||
48 | - { | ||
49 | - domain: '.yohobuy.com', | ||
50 | - expires: 1 | ||
51 | - }); | ||
52 | -}); | 40 | +if ($('#float-layer-close') && $('#float-layer-close')[0]) { |
41 | + floatLayerCloseHammer = new Hammer($('#float-layer-close')[0]); | ||
42 | + floatLayerCloseHammer.on('tap', function(e) { | ||
43 | + $('#float-layer-app').hide(); | ||
44 | + window.setCookie('_float-layer-app', 'id490655927', | ||
45 | + { | ||
46 | + domain: '.yohobuy.com' | ||
47 | + }); | ||
48 | + window.setCookie('_float-layer-app-close', 1, | ||
49 | + { | ||
50 | + domain: '.yohobuy.com', | ||
51 | + expires: 1 | ||
52 | + }); | ||
53 | + }); | ||
54 | +} | ||
53 | 55 | ||
54 | // $('#float-layer-btn').tap(function () { | 56 | // $('#float-layer-btn').tap(function () { |
55 | // downLoadApp('bottom'); | 57 | // downLoadApp('bottom'); |
56 | // }); | 58 | // }); |
57 | 59 | ||
58 | -floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]); | ||
59 | -floatLayerBtnHammer.on('tap', function(e) { | ||
60 | - downLoadApp('bottom'); | ||
61 | -}); | 60 | +if ($('#float-layer-btn') && $('#float-layer-btn')[0]) { |
61 | + floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]); | ||
62 | + floatLayerBtnHammer.on('tap', function(e) { | ||
63 | + downLoadApp('bottom'); | ||
64 | + }); | ||
62 | 65 | ||
63 | -if (!window.cookie('_float-layer-app')) { | ||
64 | - $('#float-layer-app').show(); | ||
65 | -} else { | ||
66 | - $('#float-layer-app').hide(); | 66 | + if (!window.cookie('_float-layer-app')) { |
67 | + $('#float-layer-app').show(); | ||
68 | + } else { | ||
69 | + $('#float-layer-app').hide(); | ||
70 | + } | ||
67 | } | 71 | } |
68 | 72 | ||
73 | + | ||
69 | /** | 74 | /** |
70 | * 频道选择页面顶部搜索 | 75 | * 频道选择页面顶部搜索 |
71 | * @author: bikai<kai.bi@yoho.cn> | 76 | * @author: bikai<kai.bi@yoho.cn> |
-
Please register or login to post a comment