Blame view

public/js/common/footer.js 1005 Bytes
zzzzzzz authored
1 2 3 4 5 6 7 8 9
/**
 * 底部JS
 * @author: liangzhifeng<zhifeng.liang@yoho.cn>
 * @date: 2015/10/26
 */

var $ = require('yoho-jquery'),
    Hammer = require('yoho-hammer');
郝肖肖 authored
10
var floatLayerBtnHammer;
zzzzzzz authored
11 12 13

require('../common');
zzzzzzz authored
14
$('#float-layer-close').on('touchend', function() {
zzzzzzz authored
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
    $('#float-layer-app').hide();
    window.setCookie('_float-layer-app', 'id490655927',
        {
            domain: '.yohobuy.com'
        });
    window.setCookie('_float-layer-app-close', 1,
        {
            domain: '.yohobuy.com',
            expires: 1
        });
    return false;
});

if ($('#float-layer-btn') && $('#float-layer-btn')[0]) {
    floatLayerBtnHammer = new Hammer($('#float-layer-btn')[0]);
    floatLayerBtnHammer.on('tap', function(e) {
31
        window.downLoadApp();
zzzzzzz authored
32 33 34
        e.srcEvent.stopPropagation();
    });
沈志敏 authored
35 36 37 38 39
    // if (typeof window.cookie === 'function' && !window.cookie('_float-layer-app')) {
    //     $('#float-layer-app').show();
    // } else {
    //     $('#float-layer-app').hide();
    // }
zzzzzzz authored
40
}