common.js 2.6 KB
new WOW().init();


function FullScreen() {
    var ele = document.documentElement;
    console.log('111', ele);
    if (ele.requestFullscreen) {
        ele.requestFullscreen();
    } else if (ele.mozRequestFullScreen) {
        ele.mozRequestFullScreen();
    } else if (ele.webkitRequestFullScreen) {
        ele.webkitRequestFullScreen();
    }
}

$(function () {
    FullScreen();
    // 天数倒计时
    var chazhi = (new Date(2019, 3 - 1, 8)) - (new Date());
    countFunc(chazhi);
    var setTimer = setInterval(function () {
        chazhi = chazhi - 1000;
        countFunc(chazhi);
    }, 1000 * 60 * 60);

    function countFunc(leftTime) {
        $(".backtime_box .backtime_num").remove();
        if (leftTime >= 0) {
            var days = parseInt(leftTime / 1000 / 60 / 60 / 24, 10); //计算剩余的天数
            spstr = days.toString().split('');
            console.log(spstr);
            console.log(spstr.length - 1);
            for (var i = spstr.length - 1; i >= 0; i--) {
                var html = '<div class="backtime_num">' + spstr[i] + '</div>';
                $(".backtime_box").prepend(html);
            }
        } else {
            clearInterval(setTimer);
        }
    }


    $(window).scroll(function () {
        if ($(window).scrollTop() > 300) {
            $('#turnToContent').show();
            $('#ib_kfList').show();
        } else {
            $('#turnToContent').hide();
            $('#ib_kfList').hide();
        }
    })


    $('.link_a li').click(function () {
        $(this).addClass('active_a').siblings().removeClass('active_a');
    })
    $('.nav_ul li').click(function () {
        $(this).addClass('on').siblings().removeClass('on');
    })


    $('.location_nav .nav_icon').click(function () {
        console.log(123);
        var index = $(this).index();
        $(this).addClass('nav_iconactive').siblings().removeClass('nav_iconactive');
        $('.huodongbox').hide();
        $('.huodongbox').eq(index).show();

    })
})
// //到联系我们
// $('.gosite1').click(function () {
//     sessionStorage.gosite1="team";
//
// })

//分享
window._bd_share_config = {
    "common": {
        "bdSnsKey": {},
        "bdText": "",
        "bdMini": "1",
        "bdMiniList": false,
        "bdPic": "",
        "bdStyle": "0",
        "bdSize": "16"
    },
    "share": {},
    "selectShare": {
        "bdContainerClass": null,
        "bdSelectMiniList": ["weixin", "sqq", "qzone", "tsina", "tieba", "douban"]
    }
};
with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];