common.js
2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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)];