window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};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)];
jQuery(document).ready(function($) {
var PC = $(window).width() > 992,
winWidth = $(window).width(),
winHeight = $(window).height();
$('.count').length && $('.count').countUp();
// header
$('.header .search').click(function(){
$('body').addClass('hidden');
$('.fixed_search').fadeIn().addClass('active');
})
$('.fixed_search .close').click(function(){
$('body').removeClass('hidden');
$('.fixed_search').fadeOut().removeClass('active');
})
$('.js_form button').click(function () {
var _this = $('.js_form input[type="text"]');
var _val = _this.val();
val = $.trim(_val);
if (val == "") {
alert("关键字不能为空");
return false;
}
})
if(PC){
$('.header ul li').each(function(){
var _d2 = $(this).find('.drop_menu2');
if(_d2.length){
var _pLeft = $(this).offset().left;
_d2.width(winWidth).css('left',-_pLeft);
}
})
$(window).scroll(function(){
if($(window).scrollTop() > 10){
$('.header').addClass('down');
}else{
$('.header').removeClass('down');
}
})
}else{
$('.header').append('
');
$('.mNavBtn').click(function () {
$(this).toggleClass('active');
$('.header .m_nav').toggleClass('active');
});
$('.m_nav .box').each(function(){
if($(this).children('.boxes').length){
$(this).children('a').attr('href','javascript:;').addClass('icon');
}
})
$('.m_nav .box').click(function(){
if($(this).children('.boxes').length && !$(this).hasClass('active') && !$(this).children('.boxes').hasClass('open')){
console.log(1)
$(this).addClass('active')
$(this).children('.boxes').addClass('open');
}else{
// return false;
}
})
$('.m_nav .boxes>a.back').click(function(){
var _this = $(this);
if($(this).closest('.boxes').hasClass('open')){
$(this).closest('.boxes').removeClass('open');
setTimeout(function(){
_this.closest('.box').removeClass('active');
},50)
}
})
}
// header end
$('.js_video_btn').click(function(){
$('body').addClass('hidden');
var _url = $(this).attr('video_url')
$('.video_pop video').attr('src',_url)
$('.video_pop video')[0].play();
$('.video_pop').fadeIn(400);
})
$('.video_pop .close,.video_pop .bg').click(function(){
$('.video_pop video')[0].pause();
$('.video_pop').fadeOut(400);
$('body').removeClass('hidden');
})
function sameHeight(obj){
var arrayHeight = new Array();
for (var i = 0; i < obj.length; i++) {
arrayHeight.push(obj.eq(i).find('.js_para').height())
}
var max = Math.max.apply(null, arrayHeight);
obj.find('.js_para').height(max)
}
$(window).load(function(){
sameHeight($('.js_para_items'));
})
function commNavLine(){
$(window).load(function(){
$('.comm_subnav .line').animate({
width: $('.comm_subnav .item.active a').width() + $('.comm_subnav .item.active a').position().left
},500)
})
var a = $('.comm_subnav .item').length;
var b = $('.comm_subnav .item.active').index();
if(a>6){
$('.comm_subnav .line').remove();
}
if(PC && a > 5){
$('.comm_subnav .slick').slick({
slidesToShow: 5,
infinite: false,
// draggable: false,
})
$('.comm_subnav .slick').slick('slickGoTo',b-4,true)
}
}
$('.comm_subnav').length && commNavLine();
function commSec1(){
$('.comm_sec1 .slick').slick({
draggable: false,
slidesToShow: 3,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
pauseOnHover: false,
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 1,
arrows: false,
dots: true,
}
},
]
})
}
$('.comm_sec1').length && commSec1();
function indexInit(){
// banner
// if (PC) {
// var obj = $('.section1 .item');
// if (obj.width() / obj.height() > 1.78) {
// $(".section1 video").css({
// 'width': '100%',
// 'height': 'auto '
// });
// } else {
// $(".section1 video").css({
// 'height': '100%',
// 'width': 'auto'
// });
// }
// var md = $('#indexVideo')[0];
// $('.section1 .slick').init(function (slick) {
// md.play();
// })
// $('.section1 .slick').on('afterChange', function (event, slick, currentSlide) {
// if (currentSlide == '0') {
// md.play();
// } else {
// md.pause();
// md.currentTime = 0;
// }
// })
// } else {
// $('.section1 .slick .item')[0].remove();
// }
$('.section1 .slick').slick({
autoplay: true,
autoplaySpeed: 5000,
// draggable: false,
infinite: false,
pauseOnHover: false,
responsive:[
{
breakpoint: 992,
settings:{
infinite: true,
arrows: false,
dots: true,
}
}
]
})
// section2
if(PC){
$('.section2 .items .item').mouseenter(function(){
$('.section2 .comm_title').css('opacity','0')
$(this).fadeOut().siblings().show();
$('.section2 .bg_block .bgs').addClass('active');
$('.section2 .bg_block .txt').addClass('active');
$('.section2 .bg_block .txt h3').text($(this).text());
$('.section2 .bg_block .txt span').text($(this).attr('data-span'));
$('.section2 .bg_block .bgs .bg').eq($(this).index()).addClass('active').siblings().removeClass('active');
$('.section2 .conts .cont').eq($(this).index()).addClass('active').siblings().removeClass('active');
$('.section2 .dots span').removeClass('yellow red blue');
if($(this).index() == 0){
$('.section2 .svg').show();
$('.section2 .dots span').eq(0).addClass('yellow');
$('.section2 .dots span').eq(1).addClass('red');
$('.section2 .dots span').eq(2).addClass('blue');
}else{
$('.section2 .svg').hide();
}
if($(this).index() == 1){
$('.section2 .dots span').eq(4).addClass('blue');
}
if($(this).index() == 2){
$('.section2 .dots span').eq(6).addClass('purple');
}
})
}else{
$('.section2 .m_show').slick({
arrows: false,
dots: true,
})
}
// section3
$('.section3 .btn').mouseenter(function(){
$(this).removeClass('active').siblings().addClass('active');
$('.section3 .item').eq($(this).index()).addClass('active').siblings().removeClass('active');
})
// section4
$('.section4 .slick').slick({
slidesToShow: 3,
slidesToScroll: 1,
draggable: false,
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 1,
arrows: false,
dots: true,
}
},
]
})
// section5
$('.section5 .tab_title a').click(function(){
if(!$(this).hasClass('active')){
$(this).addClass('active').siblings().removeClass('active');
$('.section5 .child').eq($(this).index()).show().siblings().hide();
// $('.section5 .child a.more_btn').text('更多内容');
// $('.section5 .child').each(function(){
// var _item = $(this).find('.items .item');
// if(_item.length > 12){
// $(this).find('.items .item:gt(11)').hide();
// }
// })
}
})
$('.section5 .s_tab_t span').click(function(){
if(!$(this).hasClass('active')){
$(this).addClass('active').siblings().removeClass('active');
$('.section5 .s_tan_c .block').eq($(this).index()).show().siblings().hide();
}
})
$('.section5 .items').each(function(){
var _item = $(this).find('.item');
if(_item.length > 12){
$(this).find('.item:gt(11)').hide();
}
})
$('.section5 .tab_content a.more_btn').click(function(){
$(this).text('没有更多了');
$(this).prev('.items').find('.item:gt(11)').show();
})
}
$('.index_main').length && indexInit();
function aboutIndex(){
// section2
if(PC){
$(window).load(function(){
var arrayHeight = new Array();
for (var i = 0; i < $('.js_year_desc .item').length; i++) {
arrayHeight.push($('.js_year_desc .item').eq(i).height())
}
var max = Math.max.apply(null, arrayHeight);
$('.js_year_desc .item').height(max)
})
var a = 0,
can = true;
do{
$('.js_year_box').children(".item:lt(5)").wrapAll('')
} while ($(".js_year_box").children(".item").length);
$('.section2 .next').click(function(){
if(can){
can = false;
a++;
if(a > $('.js_year_box .box').length){
a = $('.js_year_box .box').lenght-1;
}
$('.js_year_box .box').eq(a).addClass('active').siblings().removeClass('active');
setTimeout(function(){
can = true;
}, 500)
}
})
$('.section2 .prev').click(function(){
if(can){
can = false;
a--;
if(a < 1){
a = 0;
}
$('.js_year_box .box').eq(a).addClass('active').siblings().removeClass('active');
setTimeout(function(){
can = true;
}, 500)
}
})
$('.js_year_box .box').each(function(){
if($(this).index() == 0){
$(this).addClass('active');
$(this).find('.item:eq(0)').addClass('active');
}
})
$('.js_year_box .item').mouseenter(function(){
$(this).parents('.box').siblings().find('.item').removeClass('active');
$(this).addClass('active').siblings().removeClass('active');
var _year = $(this).find('span').text();
$('.js_year_desc .item[data-year='+_year+']').show().siblings().hide();
})
}else{
$('.js_year_desc').slick({
arrows: false,
dots: true,
})
}
// section4
if(PC){
$('.section4 .item').click(function(){
$(this).addClass('active').siblings().removeClass('active');
$('.section4 .img').eq($(this).index()).addClass('active').siblings().removeClass('active');
})
}else{
$('.section4 .item').removeClass('active');
}
// section5
$('.section5 a').click(function(){
$(this).hasClass('play') ? $(this).removeClass('play') : $(this).addClass('play');
$(this).parents('.section5').find('video')[0].paused ? $(this).parents('.section5').find('video')[0].play() : $(this).parents('.section5').find('video')[0].pause();
return false;
})
// section6
$('.section6 .slick').slick({
slidesToShow: 5,
slidesToScroll: 1,
infinite: false,
draggable: false,
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 1,
arrows: false,
dots: true,
}
},
]
})
}
$('.about_index').length && aboutIndex();
function about4(){
if(!PC){
$('.section1 .items').slick({
arrows: false,
slidesToShow: 2,
slidesToScroll: 1,
// focusOnSelect: true,
dots: true,
})
}
}
$('.about_4').length && about4();
function about5(){
var a = $('.small_slick .item').length;
$('.js_prev').text($('.small_slick .item:last').find('img').attr('title'));
$('.js_next').text($('.small_slick .item').eq(1).find('img').attr('title'));
$('.big_slick').slick({
arrows: false,
draggable: false,
infinite: false,
asNavFor: '.small_slick .items',
})
$('.small_slick .items').slick({
arrows: false,
slidesToShow: 6,
slidesToScroll: 1,
draggable: false,
infinite: false,
asNavFor: '.big_slick',
focusOnSelect: true,
responsive: [
{
breakpoint: 1400,
settings: {
slidesToShow: 5,
}
},
{
breakpoint: 992,
settings: {
slidesToShow: 2,
focusOnSelect: true,
}
},
]
// focusOnSelect: true,
// centerMode: true,
// centerPadding: 0,
})
$('.js_prev').click(function () {
$('.small_slick .items').slick("slickPrev")
})
$('.js_next').click(function () {
$('.small_slick .items').slick("slickNext")
})
$('.small_slick .items').on('beforeChange', function (event, slick, currentSlide, nextSlide) {
setTimeout(function(){
var prevText = $('.small_slick .item.slick-current').prev().find('img').attr('title');
var nextText = $('.small_slick .item.slick-current').next().find('img').attr('title');
if(nextSlide + 1 == a){
nextText = '没有更多了'
}
if(nextSlide == 0){
prevText = '没有更多了'
}
$('.js_prev').text(prevText);
$('.js_next').text(nextText);
},50)
})
$('.small_slick .item').click(function(){
var _this = $(this);
setTimeout(function(){
var prevText = $('.small_slick .item.slick-current').prev().find('img').attr('title');
var nextText = $('.small_slick .item.slick-current').next().find('img').attr('title');
if(Number(_this.attr('data-num')) + 1 == a){
nextText = '没有更多了'
}
if(Number(_this.attr('data-num')) == 0){
prevText = '没有更多了'
}
$('.js_prev').text(prevText);
$('.js_next').text(nextText);
},50)
})
}
$('.about_5').length && about5();
function about6(){
if(PC){
do{
$('.section1 .slick').children(".item:lt(2)").wrapAll('')
} while ($(".section1 .slick").children(".item").length);
}
$('.section1 .slick').slick({
slidesToShow: 5,
slidesToScroll: 5,
draggable: false,
infinite: false,
responsive: [
{
breakpoint: 1400,
settings: {
slidesToShow: 5,
slidesToScroll: 5,
}
},
{
breakpoint: 992,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
focusOnSelect: true,
dots: true,
arrows: false,
}
},
]
})
}
$('.about_6').length && about6();
function about7(){
//map API
var map = new BMap.Map("contactMap");
var point = new BMap.Point(116.384129,39.999544);
map.centerAndZoom(point,18);
var marker2 = new BMap.Marker(point);
//信息窗口
var opts;
var sContent ='';
var infoWindow = new BMap.InfoWindow(sContent,opts);
map.addOverlay(marker2);
marker2.openInfoWindow(infoWindow);
marker2.addEventListener("click", function(){
this.openInfoWindow(infoWindow);
});
}
$('.about_7').length && about7();
function recruit1(){
$('.js_form li').click(function () {
var text = $(this).text();
$(this).parents('.box').find('input').attr('value', text);
})
$('.js_rec_job .item .show').click(function(){
if(!$(this).parent('.item').hasClass('active')){
$(this).parents('.item').addClass('active').siblings().removeClass('active');
$('.js_rec_job .hide').slideUp();
$(this).next().slideDown();
}
})
$('.js_rec_job .hide .close').click(function(){
$(this).parents('.item').removeClass('active');
$(this).parents('.hide').hide();
})
}
$('.recruit_1').length && recruit1();
function recruit2(){
$(window).load(function(){
var box = document.getElementById("homeRollingNews"),
can=true,
h = $('.rolling ul').height();
box.onmouseover=function(){can=false};
box.onmouseout=function(){can=true};
new function (){
var stop=box.scrollTop%h==0&&!can;
if(!stop)box.scrollTop==parseInt(box.scrollHeight/2)?box.scrollTop=0:box.scrollTop++;
setTimeout(arguments.callee,box.scrollTop%h?5:3000);
};
})
}
$('.recruit_2').length && recruit2();
function recruit3(){
$('.js_para_items .item').mouseenter(function(){
$(this).addClass('active').siblings().removeClass('active');
})
}
$('.recruit_3').length && recruit3();
function solutionCategoryInit(){
if(PC){
$('#fullpage').fullpage({
verticalCentered: false,
normalScrollElements: '',
navigation: false,
normalScrollElements: '',
anchors: ['1', '2', '3'],
// menu: '#partner_menu',
css3: true,
easing: 'linear',
// easingcss3: 'cubic-bezier(0.86, 0, 0.07, 1)',
scrollingSpeed: 800,
afterLoad: function(anchorLink, index){
if(index !== 1){
$('.section2').addClass('scale');
}else{
$('.section2').removeClass('scale');
}
},
onLeave: function(index, nextIndex, direction){
}
});
// circle
var ani = true,
b = 0;
var s = $('.js_circle .bg .item').length;
$('.js_circle .bg .item').eq(0).addClass('active');
$('.js_circle .cont .item').eq(0).addClass('active');
$('.js_circle .dots .dot').eq(0).addClass('active');
var timer = setInterval(setMove, 5000);
function cirChange(i){
$('.js_circle .circle .svg2').attr('data-path',s+'-'+i);
setTimeout(function(){
$('.js_circle .dots .dot').eq(i).addClass('active').siblings().removeClass('active');
// bg remove
$('.js_circle .bg .item.active').stop(true).animate({
left: '-100%'
},800,'easeInOutExpo',function(){
$('.js_circle .bg .item.active').removeClass('active').css('left','100%')
});
$('.js_circle .bg .item').eq(i).stop(true).animate({
left: '0'
},800,'easeInOutExpo',function(){
$('.js_circle .bg .item').eq(i).addClass('active').siblings().removeClass('active');
});
// cont remove
$('.js_circle .cont .item.active').stop(true).animate({
left: '-100%'
},800,'easeInOutExpo',function(){
$('.js_circle .cont .item.active').removeClass('active').css('left','100%')
});
$('.js_circle .cont .item').eq(i).stop(true).animate({
left: '0'
},800,'easeInOutExpo',function(){
$('.js_circle .cont .item').eq(i).addClass('active').siblings().removeClass('active');
});
if(i == 0){
$('.js_circle .circle .svg2').attr('data-path','');
}
},1000)
}
$('.js_circle .dots .dot').click(function(){
if(ani && !$(this).hasClass('active')){
b = $(this).index();
clearInterval(timer);
ani = false;
cirChange(b);
setTimeout(function(){
ani = true;
timer = setInterval(setMove, 5000)
}, 1800)
}
})
function setMove(){
b++;
if(b > s-1){
b = 0;
}
cirChange(b);
}
}
}
$('.solution_category').length && solutionCategoryInit();
function solutionDetail(){
$('.section2 .slick .items').slick({
slidesToShow: 7,
slidesToScroll: 1,
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 2,
arrows: false,
dots: true
}
}
]
})
$('.section1 .item').each(function(){
var str = $(this).find('p').text();
if(str.length > 46){
str = str.substr(0, 46);
$(this).find('p').text(str+'...');
}
})
}
$('.solution_detail').length && solutionDetail();
function empowermentInit(){
if(PC){
// $('.section2 .dots .dot').mouseenter(function(){
// $('.section2 .conts .item').eq($(this).index()).addClass('active').siblings().removeClass('active');
// })
$(window).scroll(function(){
if($(window).scrollTop() > $('.section2 .circle').offset().top - winHeight/2){
$('.section2 .conts .item').addClass('active');
}
});
}else{
$('.section2 .conts').slick({
arrows: false,
dots: true,
infinite: false,
})
}
}
$('.empowerment_main').length && empowermentInit();
function aboutIntroduction(){
$('.section3 .items').slick({
draggable: false,
slidesToShow: 4,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
pauseOnHover: false,
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 1,
arrows: false,
dots: true,
}
},
]
})
}
$('.about_1').length && aboutIntroduction();
})