$(function(){ // window.addEventListener( // 'touchstart', // e => e.preventDefault(), // { passive: false } // ); $('.shareCon .icon-weixin1').click(function(){$('.bshare-weixin')[0].click();}); $('.shareCon .icon-weibo1').click(function(){$('.bshare-sinaminiblog')[0].click();}); $('.shareCon .icon-lianjie').click(function(){$('.bshare-clipboard')[0].click();}); $('.shareCon .icon-youxiang').click(function(){$('.bshare-email')[0].click();}); //解决方案和产品服务的瀑布流菜单 waterFallProduct(); waterFallSolution(); var items = $('.iMainValue_1 .product .text .num_item'); if(items.length>0){ items.each(function(i){ var nums = items.eq(i).children('.num').text(); jumpNumber(0,nums - 0,10,items.eq(i).children('.num'),i) }); } $('[rel="example_group1"]').fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 600, 'speedOut' : 200, 'overlayShow' : false }); $('[rel="example_group2"]').fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 600, 'speedOut' : 200, 'overlayShow' : false }); //关于威尼斯欢乐娱人的tabs $('.honorsTab li').click(function(){ $(this).addClass('curr').siblings().removeClass('curr'); $('.honorsCon .iHonorsList').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden'); $('body').attr('style','') }); $('.pMain7_1 .cTabs li').mouseover(function(){ console.log($(this).index()) // if(!$('.pMain7_1 .cCons li').eq($(this).index()).children('img').hasClass('hover')){ $('.pMain7_1 .cCons li').eq($(this).index()).addClass('hover') // } }); $('.pMain7_1 .cTabs li').mouseout(function(){ $('.pMain7_1 .cCons li').eq($(this).index()).removeClass('hover') }); $('.pMain_imom .img_solu img').mouseover(function(){ var index = $(this).index(); if(index == 0){ var div_func = $('.pMain_imom .img_module').children('.img_func:lt(2)'); div_func.each(function(i){ var imgs = div_func.eq(i).children('img'); imgs.eq(0).addClass('absolute') imgs.eq(1).removeClass('absolute') }); }else{ var imgs = $('.pMain_imom .img_func').eq(2).children('img'); imgs.eq(0).addClass('absolute') imgs.eq(1).removeClass('absolute') } }); $('.pMain_imom .img_solu img').mouseout(function(){ let div_func = $('.pMain_imom .img_func'); div_func.each(function(i){ var imgs = div_func.eq(i).children('img'); console.log(imgs) imgs.eq(1).addClass('absolute') imgs.eq(0).removeClass('absolute') }); }); $('.pMain_imom .img_func').mouseover(function(){ let imgs = $('.pMain_imom .img_func').eq($(this).index()).children('img'); imgs.eq(0).addClass('absolute') imgs.eq(1).removeClass('absolute') }); $('.pMain_imom .img_func').mouseout(function(){ let imgs = $('.pMain_imom .img_func').eq($(this).index()).children('img'); imgs.eq(1).addClass('absolute') imgs.eq(0).removeClass('absolute') }); if($(window).width()>1024) { $('.iProductList .swiper-slide').mouseover(function () { $(this).siblings('.swiper-slide').children('.product').removeClass('hover'); $(this).children('.product').addClass('hover'); }); $('.iProductList .swiper-slide').mouseout(function () { $(this).siblings('.swiper-slide').children('.product').removeClass('hover'); $(this).children('.product').removeClass('hover'); }); $('.iProductList .swiper-slide-half').mouseover(function () { $(this).siblings('.swiper-slide-half').children('.product').removeClass('hover'); $(this).children('.product').addClass('hover'); }); $('.iProductList .swiper-slide-half').mouseout(function () { $(this).siblings('.swiper-slide-half').children('.product').removeClass('hover'); $(this).children('.product').removeClass('hover'); $('.iProductList .swiper-slide-half').eq(0).children('.product').addClass('hover'); }); $('.iProductList .swiper-slide-three').mouseover(function () { var count = $('.iProductList .swiper-slide-three').length; var totalWidth = $('.iProductList .swiper-slide-three').parent('.list')[0].getBoundingClientRect().width; var activeWidth = totalWidth * 2 / (count + 1) var itemWidth = (totalWidth - activeWidth) / (count - 1); $(this).siblings('.swiper-slide-three').width(itemWidth).children('.product').removeClass('hover'); $(this).width(activeWidth).children('.product').addClass('hover'); }); $('.iProductList .swiper-slide-three').mouseout(function () { var count = $('.iProductList .swiper-slide-three').length; var totalWidth = $('.iProductList .swiper-slide-three').parent('.list')[0].getBoundingClientRect().width; var activeWidth = totalWidth * 2 / (count + 1) var itemWidth = (totalWidth - activeWidth) / (count - 1); $(this).siblings().width(itemWidth).children('.product').removeClass('hover'); $(this).width(itemWidth).children('.product').removeClass('hover'); $('.iProductList .swiper-slide-three').eq(0).width(activeWidth).children('.product').addClass('hover'); }); }else{ $('.iProductList .swiper-slide').mouseover(function () { $(this).siblings('.swiper-slide').children('.product').removeClass('hover'); $(this).children('.product').addClass('hover'); }); $('.iProductList .swiper-slide').mouseout(function () { $(this).siblings('.swiper-slide').children('.product').removeClass('hover'); $(this).children('.product').removeClass('hover'); }); } //发展历程 $('.historyTabs li').click(function(){ $(this).addClass('curr').siblings().removeClass('curr'); $('.historyCon .historyList').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden'); $('body').attr('style','') }); //解决方案 $('.pMain_sol .solNav li').click(function(){ var index = $(this).index(); $(this).addClass('curr').siblings().removeClass('curr'); $('.pMain_sol .solCon li').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden'); }); $('.pMain .pMainUseNav li').click(function(){ $(this).addClass('curr').siblings().removeClass('curr'); $('.pMain .useCon .pMainUse').eq($(this).index()).removeClass('hidden').siblings().removeClass('curr').addClass('hidden'); }); var solConList; $('.pMain_imotor .solNav li').click(function(){ $(this).addClass('curr').siblings().removeClass('curr'); $('.pMain_imotor .solCon li').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden'); if($('.pMom').length>0){ var index = $(this).index(); console.log(index) $('.pMom').css('display',"none"); $('.pMom').eq(index).css('display',"block") } if (solConList){ console.log("destroy") solConList.destroy(); } solConList = new Swiper('.solCon .curr .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:true, autoplay:true, grabCursor:true, slidesPerView:1, slidesPerGroup:1, clickable:true, observer:true, // 修改swiper自己或子元素时,自动初始化swiper observeParents:true,// 修改swiper的父元素时,自动初始化swiper pagination: { el: '.solCon .swiperDots', clickable: true, }, }); }); //首页 产品列表的切换 $('.mProductTab .tab').click(function(){ $(this).addClass('curr').siblings().removeClass('curr'); $('.mProduct .mProductList').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden'); $('body').attr('style','') }); $('.mProduct .mProductList .main .pd').click(function(){ if($(window).width()>640){ window.open($(this).attr('target')); }else{ if($(this).parent('.main').hasClass('is_active')){ $(this).parent('.main').removeClass('is_active'); }else{ $(this).parent('.main').addClass('is_active').siblings().removeClass('is_active'); } } }); $('.mProduct .mProductList .parent_main .childList .pd').click(function(){ if($(window).width()>640){ window.open($(this).attr('target')); }else{ if($(this).parent('.child_header').hasClass('is_active')){ $(this).parent('.child_header').removeClass('is_active'); }else{ $(this).parent('.child_header').addClass('is_active').siblings().removeClass('is_active'); } } }); $('.mProduct .mProductList .main .pd .button').click(function(){ window.open($(this).attr('target')); }); $('.mProduct .mProductList .parent_main .pd .button').click(function(){ window.open($(this).attr('target')); }); $('.jMain1_1 dt').click(function(){ if(!$(this).parents('dl').hasClass('curr')){ $(this).parents('dl').addClass('curr').siblings().removeClass('curr').find('dd').slideUp(); $(this).parents('dl').find('dd').slideDown(); }else{ $(this).parents('dl').removeClass('curr').find('dd').slideUp(); } }); $('.jMain1_1 dl').eq(0).addClass('curr').find('dd').show(); $('.ipt_list1_c1 input').click(function(){ if($(this).parents('li').hasClass('curr')){ $(this).parents('li').removeClass('curr'); }else{ if($(this).parents('ul').find("li.curr").length>=3){ return false; }else{ $(this).parents('li').addClass('curr'); } } }); $('.ipt_list1_r1 input').click(function(){ $(this).parents('li').addClass('curr').siblings().removeClass('curr'); }); //响应式菜单按钮 $('.menu-link').click(function(){ if(!$(this).hasClass('active')){ $(this).addClass('active'); $('.menu').slideDown(); $('.tSearch,.tContact').removeClass('active'); $('.tSearch .box,.tContact .box').fadeOut(); }else{ $(this).removeClass('active'); $('.menu').slideUp(); } }); //输入框改变和还原 $('[placeholder]').focus(function(){ $(this).attr('placeholder',''); }) $('[placeholder]').blur(function(){ $(this).attr('placeholder',$(this).attr('data-placeholder')); }); $('.iProTab li').mouseenter(function(){ $(this).addClass('curr').siblings().removeClass('curr'); $('.iProCon li').eq($(this).index()).show().siblings().hide(); }); /*视频*/ $(".play_btn").click(function() { var dataVideo = $(this).attr("data-video"); var poster = $(this).attr("data-img"); $("body").append( '
'); $(".video_bg,.video_box").fadeIn(); }); $(document).on('click','.video_box i',function(){ $(".video_bg,.video_box").fadeOut(500, function() { $(".video_bg,.video_box").remove(); }); }); $(document).on('click','.video_bg',function(){ $(".video_bg,.video_box").fadeOut(500, function() { $(".video_bg,.video_box").remove(); }); }); var iBanner = new Swiper('.iBanner .swiper', { paginationClickable: true, effect: 'slide', speed:800, loop:true, autoplay: { delay: 96000, disableOnInteraction: false, }, pagination: { el: '.iBanner .swiperDots', clickable: true, }, navigation: { nextEl: '.iBanner .swiperNext', prevEl: '.iBanner .swiperPrev', } }); var iCasesList = new Swiper('.iCasesList .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:true, pagination: { el: '.iCasesList .swiperDots', clickable: true, }, navigation: { nextEl: '.iCasesList .swiperNext', prevEl: '.iCasesList .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 1, slidesPerGroup : 1 }, 961: { slidesPerView: 1, slidesPerGroup : 1 }, 641: { slidesPerView: 1, slidesPerGroup : 1 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var iNewsList = new Swiper('.iNewsList .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:true, pagination: { el: '.iNewsList .swiperDots', clickable: true, }, navigation: { nextEl: '.iNewsList .swiperNext', prevEl: '.iNewsList .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 3, slidesPerGroup : 1 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); //解决方案里行业案例的轮播图 var SCasesList = new Swiper('.SCasesList .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:false, pagination: { el: '.SCasesList .swiperDots', clickable: true, }, navigation: { nextEl: '.SCasesList .swiperNext', prevEl: '.SCasesList .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 3, slidesPerGroup : 1 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var iSolutionList = new Swiper('.iSolutionList .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:false, pagination: { el: '.iSolutionList .swiperDots', clickable: true, }, navigation: { nextEl: '.iSolutionList .swiperNext', prevEl: '.iSolutionList .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 1, slidesPerGroup : 1 }, 961: { slidesPerView: 1, slidesPerGroup : 1 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var iProductList = new Swiper('.iProductList .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:false, grabCursor:true, slidesPerView: 'auto', slidesPerGroup:1, pagination: { el: '.iProductList .swiperDots', clickable: true, }, navigation: { nextEl: '.iProductList .swiperNext', prevEl: '.iProductList .swiperPrev', }, }); var platformList = new Swiper('.platformList .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:false, grabCursor:true, slidesPerView: 'auto', slidesPerGroup:1, clickable:true, pagination: { el: '.platformList .swiperDots', clickable: true, }, navigation: { nextEl: '.platformList .swiperNext', prevEl: '.platformList .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 4, slidesPerGroup : 1 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var courseList = new Swiper('.courseList .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:false, pagination: { el: '.courseList .swiperDots', clickable: true, }, navigation: { nextEl: '.courseList .swiperNext', prevEl: '.courseList .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 5, slidesPerGroup : 1 }, 961: { slidesPerView: 4, slidesPerGroup :1 }, 641: { slidesPerView: 2, slidesPerGroup : 1 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var jobListB = new Swiper('.jobListB .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:false, pagination: { el: '.jobListB .swiperDots', clickable: true, }, navigation: { nextEl: '.jobListB .swiperNext', prevEl: '.jobListB .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 3, slidesPerGroup : 1 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var jobListC = new Swiper('.jobListC .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:true, pagination: { el: '.jobListC .swiperDots', clickable: true, }, navigation: { nextEl: '.jobListC .swiperNext', prevEl: '.jobListC .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 3, slidesPerGroup : 1 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var iCase = new Swiper('.iCase .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:true, pagination: { el: '.iCase .swiperDots', clickable: true, }, navigation: { nextEl: '.iCase .swiperNext', prevEl: '.iCase .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 3, slidesPerGroup : 3 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 1, slidesPerGroup : 1 } } }); var iHonorsListA = new Swiper('.iHonorsListA .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:true, pagination: { el: '.iHonorsListA .swiperDots', clickable: true, }, navigation: { nextEl: '.iHonorsListA .swiperNext', prevEl: '.iHonorsListA .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 4, slidesPerGroup : 4 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 2, slidesPerGroup : 2 } } }); var iHonorsListB = new Swiper('.iHonorsListB .swiper',{ effect:'slide', paginationClickable: true, watchActiveIndex: true, loop:true, pagination: { el: '.iHonorsListB .swiperDots', clickable: true, }, navigation: { nextEl: '.iHonorsListB .swiperNext', prevEl: '.iHonorsListB .swiperPrev', }, breakpoints: { 1025: { slidesPerView: 4, slidesPerGroup : 4 }, 961: { slidesPerView: 3, slidesPerGroup : 3 }, 641: { slidesPerView: 2, slidesPerGroup : 2 }, 241: { slidesPerView: 2, slidesPerGroup : 2 } } }); var iPartnerList = new Swiper('.iPartnerList .swiper',{ // slidesPerView:6, paginationClickable: true, watchActiveIndex: true, loop:false, autoplay: { delay: 4800, disableOnInteraction: false, }, pagination: { el: '.iPartnerList .swiperDots', clickable: true, }, navigation: { nextEl: '.iPartnerList .swiperNext', prevEl: '.iPartnerList .swiperPrev', }, breakpoints: { 1980: { //屏幕宽度大于值时 loop:false, slidesPerView: 6, slidesPerColumn: 5, slidesPerGroup : 30, }, 1200: { loop:false, slidesPerView: 6, //列 slidesPerColumn: 5, //行 slidesPerGroup : 30,//组 }, 800: { loop:false, slidesPerView: 4, //列 slidesPerColumn: 3, //行 slidesPerGroup : 12,//组 }, 241: { loop:false, slidesPerView: 2, slidesPerColumn: 3, slidesPerGroup : 2, } } }); var iSolutionCon = new Swiper('.iSolutionCon .swiper', { paginationClickable: true, effect: 'fade', speed:800, loop:false, pagination: { el: '.iSolutionCon .swiperDots', clickable: true, }, navigation: { nextEl: '.iSolutionCon .swiperNext', prevEl: '.iSolutionCon .swiperPrev', }, on: { slideChange: function(){ //console.log(this.activeIndex); $('.iSolutionTab li').eq(this.activeIndex).addClass('curr').siblings().removeClass('curr'); } } }); //产品与服务 if($(window).width()>1024) { var count = $('.iProductList .swiper-slide-three').length; if (count > 0) { var count = $('.iProductList .swiper-slide-three').length; var totalWidth = $('.iProductList .swiper-slide-three').parent('.list')[0].getBoundingClientRect().width; var activeWidth = totalWidth * 2 / (count + 1) var itemWidth = (totalWidth - activeWidth) / (count - 1); $('.iProductList .swiper-slide-three').width(itemWidth); $('.iProductList .swiper-slide-three').eq(0).width(activeWidth).children('.product').addClass('hover'); } } $('.swiperDots').each(function(index, element) { //console.log($(this).find('span').length) if($(this).find('span').length <= 1){ $(this).hide(); } }); var timer22 = 1; $('.iSolutionTab li').mouseenter(function(){ /*if(timer22 == 1){ clearTimeout(timer22); timer22 = setTimeout(function () { var tTop = $('.iSolutionTab').offset().top-$('.iSolutionTab').height()-$('.iMain1 .tit1').height()-80; $('html,body').animate({scrollTop:tTop},500); timer22=1; }, 100); }*/ $(this).addClass('curr').siblings().removeClass('curr'); $('.iSolutionCon .swiperDots span').eq($(this).index()).click(); }); $('.menu li').mouseover(function(){ // $(this).css("color","red"); // console.log("hover") // $(this).addClass('active'); }); $('.plex .block').hover(function(){ var index = $(this).index(); console.log(index,"hover") var lines = $('.plex .line').children(); lines.each(function(i){ if(lines.eq(i).hasClass("line"+index)){ lines.eq(i).addClass("hover"); } }); $('.plex .component').siblings().removeClass('animation').eq($(this).index()).addClass("animation"); //中台 if(index == 0){ $('.plex .models').children('.component').each(function(i){ $('.plex .models').children('.component').eq(i).attr("animation-delay",(0.1*(i+2))+"s").addClass("animation") }); $('.plex .models').children('.component').eq(0).removeClass("animation").addClass("hover"); }else if(index == 1){ $('.plex .center').children('.component:gt(0)').addClass("animation"); }else if(index ==2){ $('.plex .center').children('.component:gt(0):lt(2)').addClass("animation"); }else{ $('.plex .center').children('.component').addClass("animation"); } }); $('.plex .block').mouseleave(function(){ $('.plex .component').siblings().removeClass('animation').removeClass("hover"); $('.plex .line').children().each(function(i){ $('.plex .line').children().eq(i).removeClass("hover"); }); console.log("mouseleave") }); $('.caseNav li').click(function(){ // $(this).css("color","red"); $(this).siblings("li").removeClass("curr"); $(this).addClass("curr"); //获取当前的id 来显隐下面列表的id var sid = $(this).attr("id"); $(this).parents(".caseNav").siblings(".caseListC").css("display","none"); console.log($(this).parents(".caseNav").siblings("list"+sid)); $(this).parents(".caseNav").siblings("#list"+sid).css("display","block"); // $(this).addClass('active'); }); $('.menu li .h3 span').click(function(){ if($(this).parents('.h3').next('.box').is(':hidden')){ $(this).addClass('active'); $(this).parents('li').addClass('curr').siblings().removeClass('curr').find('.h3 span').removeClass('active'); $(this).parents('.h3').next(".box").slideDown().parents('li').siblings('li').find('.box').slideUp(); }else{ $(this).removeClass('active'); $(this).parents('.h3').siblings(".box").slideUp(); } }); /** * 业务咨询 和留言咨询 */ $('.pNav .btn_nav').click(function(){ var t= $(this).attr("title"); $('.zModal .mtitle .intitle').text(t); $(".zModal").css("display","block"); $(".zfIndex").css("display","block"); // $(".zfIndex").css("op"); }); /** * 在线留言 */ $('.subNav .li0').click(function(){ $('.zModal .mtitle .intitle').text("在线咨询"); $.trim($('#content_type').val("在线咨询")); $(".zModal").css("display","block"); $(".zfIndex").css("display","block"); // $(".zfIndex").css("op"); }); /** * 云盒 参数 详情 */ $('.pMainUse .pd .btn_params').click(function(){ var t= $(this).attr("title"); var content= $(this).siblings('.btn_content').eq(0).html(); $('.contentModal .mtitle .intitle').text(t); $('.contentModal .content').html(content); $(".contentModal").css("display","block"); var height = $(".contentModal .zfIndex").height(); $(".zfIndex").css("display","block"); $(".contentModal .zfIndex").css("margin-top","calc(45vh - "+(height / 2)+"px)"); }); /** * */ $('.pMainUse .btn_nav').click(function(){ var t= $(this).attr("title"); $('.zModal .mtitle .intitle').text(t); $(".zModal").css("display","block"); $(".zfIndex").css("display","block"); // $(".zfIndex").css("op"); }); /** * 显示视频 */ $('.banner__download .banner__download-item').click(function(){ var t= $(this).attr("href"); var type = $(this).attr("type"); var title = $(this).attr("title"); console.log(type) if(type == 1){ window.open(t); }else if(type == 10){ $('.videoModal .hr').text(t); $(".videoModal").css("display","block"); $('.videoModal .mtitle .intitle').text(title); $(".videoModal video").attr("src",t); $(".videoModal .zfIndex").css("display","block"); } }); $('.videoModal .mtitle .close').click(function(){ $(".videoModal").css("display","none"); $(".videoModal .zfIndex").css("display","none"); // $(".zfIndex").css("op"); }); $('.contentModal .close').click(function(){ console.log($(this).attr("title")); $(".contentModal").css("display","none"); $(".contentModal .zfIndex").css("display","none"); $('.contentModal .content').html(""); // $(".zfIndex").css("op"); }); /** * 进入系统跳转 */ $('.pNav .ad_system').click(function(){ window.open($(this).attr("target")); }); $('.zModal .close').click(function(){ console.log($(this).attr("title")); $(".zModal").css("display","none"); $(".zfIndex").css("display","none"); // $(".zfIndex").css("op"); }); $(".menu dt span").click(function() { if ($(this).parents('dt').next("dd").is(":hidden")) { $(this).addClass("active"); $(this).parents('dl').siblings().find('dd').slideUp(); $(this).parents('dt').next("dd").slideDown(); } else { $(this).removeClass("active"); $(this).parents('dt').next("dd").slideUp(); } }); $('.show_sq').click(function(event){ event.stopPropagation(); $('.nb-icon-wrap').click(); return false; }); $('.back_top').click(function(){ $('html,body').animate({scrollTop:0},120); }); $('.pageNext').click(function(){ $('html,body').animate({scrollTop:$(window).height()},500) }) function navFix(){ if($('.proInfoTit').length>0){ if($(window).scrollTop()>$('.proInfoTit').offset().top){ $('.proInfoTit').addClass('fix'); }else{ $('.proInfoTit').removeClass('fix'); } } } navFix(); $(window).scroll(function(){ $('.menu-btn,.headBg').removeClass('active'); $('.head').removeClass('headCurr'); bodyFix(); navFix(); }); $(window).resize(function(){ //解决方案和产品服务的瀑布流菜单 waterFallProduct(); waterFallSolution(); }); $('body').addClass('body_ready'); function bodyFix(){ if($(window).width()>1024){ if($(window).scrollTop()>10){ $('body').addClass('body_fix') }else{ $('body').removeClass('body_fix') } }else{ $('body').removeClass('body_fix') } }; bodyFix(); /*if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ new WOW().init(); };*/ if($(window).width()>1024){ // var shicha = skrollr.init({ // constants: { // //fill the box for a "duration" of 150% of the viewport (pause for 150%) // //adjust for shorter/longer pause // box: '100p' // } // }); } if($('[data-josh-anim-name]').length>0){ var josh = new Josh({ initClass: "[data-josh-anim-name]", animateInMobile: true, offset: 0.3, onDOMChange: true }); } }); function toPage(e){ var tTop= $('#toPage'+e).offset().top-$('.proInfoTit').height(); $('html,body').animate({scrollTop:tTop},500); } function backTop(){ $('html,body').animate({scrollTop:0},120); } function waterFallProduct(){ //1首先要确定图片的宽度和滚动条的宽度 var pageWidth = $(".menu .pbox")[1].getBoundingClientRect().width *0.7 - 8; var columns = 3; //这里可以设置为几列 var itemWidth = parseInt(pageWidth/columns)-20; //得到item的宽度 //手机端则不采用瀑布流 if($(window).width()<1024){ $(" .menu .pbox .pd .item").each(function(i){ $(this).css({top:0, left:0,}); }); return false; } $(".menu .pbox .pd .item").width(itemWidth); //设置到item的宽度 var arr =[]; var heights =[]; $(" .menu .pbox .pd .item").each(function(i){ var height = $(this).height(); if(iarr[j]){ minHeight =arr[j]; index=j; } } //4设置下一行的第一个盒子位置 // top值就是最小列的高度 $(this).css({ top:arr[index]+50, //设置30的距离 left:$(".menu .pbox .pd .item").eq(index).css("left") }); //5修改最小列的高度 //最小列的高度 = 当前自己的高度 + 拼接过来的 高度 arr[index]=arr[index]+height+50; //设置30的距离 } }); var pdHeight = Math.max.apply(null, arr)+80; $('.menu .pbox .pd').height(pdHeight>350?pdHeight:350) } function waterFallSolution(){ //1首先要确定图片的宽度和滚动条的宽度 减去中间箭头的宽度 var pageWidth = $(".menu .pbox")[0].getBoundingClientRect().width *0.7 - 62 - 8; var columns = 2; //这里可以设置为几列 var itemWidth = parseInt((pageWidth - 30)/columns) - 30 ; //得到item的宽度 //手机端则不采用瀑布流 if($(window).width()<1024){ $(".menu .pbox .pd_list .solution_t").each(function(i){ console.log($(this)) $(this).css({top:0,left:20}); }); return false; } console.log("item width ",pageWidth/2); $(".menu .pbox .pd_list .solution_t").width(itemWidth); //设置到item的宽度 var arr =[]; var heights =[]; $(" .menu .pbox .pd_list .solution_t").each(function(i){ var height = $(this).height(); // console.log(height); if(iarr[j]){ minHeight =arr[j]; index=j; } } //4设置下一行的第一个盒子位置 // top值就是最小列的高度 $(this).css({ top:arr[index]+95, //设置30的距离 left:$(".menu .pbox .pd_list .solution_t").eq(index).css("left") }); //5修改最小列的高度 //最小列的高度 = 当前自己的高度 + 拼接过来的 高度 arr[index]=arr[index]+height+50; //设置30的距离 } }); var pdHeight = Math.max.apply(null, arr)+80; var leftHeight = $('.menu .pbox').eq(0).children('.pd_left').height(); var targetHeight = pdHeight>leftHeight?pdHeight:leftHeight; console.log(targetHeight,"solHeight"); $('.menu .pbox .pd_list').height(targetHeight) $('.menu .pbox .pd_center').height(targetHeight) } var curSolNav = 0; var initNav = true; function slideNav(){ if($('.pMain_imotor .solNav li').length>0){ if(initNav){ $('.pMain_imotor .solNav li').eq(0).click(); initNav = false; } } var lis = $('.pMain_sol .solNav li'); if (lis.length>0){ return setInterval(function () { console.log(curSolNav,"curSolNav") $('.pMain_sol .solNav li').eq(curSolNav).click(); curSolNav++; if(curSolNav>lis.length) curSolNav = 0; }, 3000); } } /** * start:起始数据 * end:最终数据 * time:动画时间 * */ var numTimer = []; function jumpNumber(start, end, time,dom,index) { console.log(dom) this.num = start let endNum = end let lastNum = '' //小数 let digit = 0 //小数位数 let step = 0 //累加步长 const len = parseInt(end).toString().length dom.text(this.num); //判断是小数 if(parseInt(end) !== end) { endNum = parseInt(end) lastNum = end.toString().split('.')[1] digit = lastNum.length } let timer = setInterval(() => { var num = dom.text() - 0; if(num < (endNum - step)) { step++ //小数 let point = this.getRandomNum(digit) //数据过大,后面几位数随机跳动 if(len >= 6) { let bigNumber = this.getRandomNum(len - 3) const leng = parseInt(start).toString().length const length = leng - bigNumber.length //截取岁随机数前面的数 const cur = length <= 0 ? parseInt(start) : parseInt(start.toString().slice(0, length)) start = cur + step + bigNumber + '.' + point } else { start = parseInt(start) + step + '.' + point } dom.text(parseFloat(start)); } else { clearInterval(this.numTimer[index]) dom.text(parseFloat(endNum)); // this.numTimer = this.numTimer.slice(index,1); // num = end } }, time) this.numTimer[index] = timer; }; function getRandomNum(len) { let point = '' for(let i = 1; i <= len; i++) { point = point + parseInt(Math.random() * 10) } return point; }