$(document).ready(function(){ //JS Swiper START $(()=>{ let body = $("body"); if(isFrontEnv()) { body.addClass("cn"); var c = $(".close_fullpage").attr("data-phone"); var pc = $(".fullpage_container").attr("data-id"); $(pc).find(".p_gridbox.signal > .p_gridCell").css("width","100%"); $(pc).find(".p_gridbox.signal > .p_gridCell").css("margin","0"); if($(window).width() > c){ //var sp = $("
").addClass("cn_pagination"); //body.append(sp); $(pc).addClass("cnfullpage"); $(pc).find(".p_gridbox.signal").addClass("swiper-container"); $(pc).find(".p_gridbox.signal > .p_gridCell").addClass("swiper-wrapper"); $(pc).find(".p_gridbox.signal > .p_gridCell > div").addClass("swiper-slide"); var ft = $(".footer_container").attr("data-footer"); if(ft){$(ft).css("height","auto");$(ft).css("transform","translate(0,0) scale(1)");} var HomeSwiper = new Swiper(".cnfullpage > .swiper-container", { direction: "vertical", effect: 'fade', fadeEffect: { crossFade: true, }, keyboard: { enabled: true, pageUpDown: false, }, speed:400, rewind:true, spaceBetween:0, mousewheel: true, mousewheelControl: true, slidesPerView: 1, slidesPerGroup: 1, loop: true, slideActiveClass: 'response-animated', on: { init:function(swiper){ slide=this.slides.eq(0); slide.addClass('response-animated ani-slide'); }, transitionStart: function(){ this.mousewheel.disable(); for(i=0;i { this.mousewheel.enable(); }, 1000); }, //禁止手指滑动 touchMove: function(swiper,event){ //你的事件 HomeSwiper.allowTouchMove= false; document.addEventListener('touchmove',touch, false); }, //向下滚动执行 slideNextTransitionStart: function(){ if (this.activeIndex == 1) { $(".cnfullpage > .swiper-container").addClass("main_bg01"); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg01"); } if (this.activeIndex == 2) { $(".cnfullpage > .swiper-container").addClass("main_bg02"); mySwiper2.init(); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg02"); } if (this.activeIndex == 3) { $(".cnfullpage > .swiper-container").addClass("main_bg03"); mySwiper4.init(); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg03"); } if (this.activeIndex == 4) { $(".cnfullpage > .swiper-container").addClass("main_bg04"); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg04"); } if (this.activeIndex == 5) { $(".cnfullpage > .swiper-container").addClass("main_bg05"); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg05"); } if (this.activeIndex == 6) { $(".cnfullpage > .swiper-container").addClass("main_bg06"); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg06"); } }, //向上滚动执行 slidePrevTransitionStart: function(){ if (this.activeIndex == 1) { $(".cnfullpage > .swiper-container").addClass("main_bg03"); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg03"); } if (this.activeIndex == 2) { $(".cnfullpage > .swiper-container").addClass("main_bg04"); mySwiper2.init(); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg04"); } if (this.activeIndex == 3) { $(".cnfullpage > .swiper-container").addClass("main_bg05"); mySwiper4.init(); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg05"); } if (this.activeIndex == 4) { $(".cnfullpage > .swiper-container").addClass("main_bg06"); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg06"); } if (this.activeIndex == 5) { $(".cnfullpage > .swiper-container").addClass("main_bg07"); } else { $(".cnfullpage > .swiper-container").removeClass("main_bg07"); } }, }, pagination: { el: ".cn_pagination", clickable: true, renderBullet: function (index, className) { switch(index){ case 0:text='首页';break; case 1:text='业务布局';break; case 2:text='解决方案';break; case 3:text='荣誉资质';break; case 4:text='合作伙伴';break; case 5:text='新闻资讯';break; } return '' + '' + text + ''+ ''; }, }, }); HomeSwiper.allowTouchMove= false; $('.btn-scroll').click(function(){ HomeSwiper.slideNext(); }); } } else { body.addClass("cn-make"); } if($(window).width() < c){ mySwiper2.init(); mySwiper4.init(); } }); //业务布局 $("#c_static_001_P_4719-1671153018676 .p_smallBBox .swiper-container").removeClass("swiper-no-swiping"); var mySwiper3 = new Swiper("#c_static_001_P_4719-1671153018676 .p_smallBBox .swiper-container", { slidesPerView: 4, spaceBetween: 20, noSwiping: false, watchSlidesProgress: true, breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 4, spaceBetween: 20 }, 768: { //当屏幕宽度大于等于768 slidesPerView: 4, spaceBetween: 20 }, 1000: { //当屏幕宽度大于等于1280 slidesPerView: 4, spaceBetween: 20 } }, }) var mySwiper2 = new Swiper("#c_static_001_P_4719-1671153018676 .p_big_slide.swiper-container", { init: false, noSwiping: false, navigation: { nextEl: "#c_static_001_P_4719-1671153018676 .swiper-button-next", prevEl: "#c_static_001_P_4719-1671153018676 .swiper-button-prev", }, loop: true, pagination: { el: ".swiper-pagination", type: "fraction", renderFraction: function (currentClass, totalClass) { return '0' + ' / ' + '0'; }, }, thumbs: { swiper: mySwiper3, }, }) // 解决鼠标悬浮切换效果 $("#c_static_001_P_4719-1671153018676 .e_bannerE-2 .p_smallBBox .swiper-slide").hover(function (e) { // 取到绑定在indexP-swiper-items上的data-index var indexTo = e.currentTarget.dataset.index; console.log(e.currentTarget.dataset.index); mySwiper2.slideToLoop(indexTo, 1000, true); $(this).addClass("swiper-slide-thumb-active").siblings().removeClass("swiper-slide-thumb-active"); }, function () { // 鼠标移出后恢复自动轮播 //mySwiper2.autoplay.start(); }) //系统解决方案 var mySwiper4 = new Swiper("#c_static_001-16632569648930 .e_loop-10 .swiper", { init: false, slidesPerView: "auto", direction: "vertical", spaceBetween: 30, loop: true, noSwiping: false, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, mousewheel: true, mousewheelControl: true, speed:800, autoHeight: true, pagination: { el: "#c_static_001-16632569648930 .e_loop-10 .swiper-pagination", clickable: true, }, navigation: { nextEl: "#c_static_001-16632569648930 .e_loop-10 .swiper-button-next", prevEl: "#c_static_001-16632569648930 .e_loop-10 .swiper-button-prev", }, breakpoints: { 320: { //当屏幕宽度大于等于320 direction: "horizontal", }, 768: { //当屏幕宽度大于等于768 direction: "horizontal", }, 1000: { //当屏幕宽度大于等于1280 direction: "vertical", } }, }) }) //JS Swiper END //合作伙伴 var swiper = new Swiper("#c_static_001-16721988065730 .swiper", { autoplay:true, speed:800, grid: { fill:'row', rows: 3, }, pagination: { el: "#c_static_001-16721988065730 .swiper-pagination", clickable: true, }, breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 3, spaceBetween: 10 }, 768: { //当屏幕宽度大于等于768 slidesPerView: 3, spaceBetween: 10 }, 1000: { //当屏幕宽度大于等于1280 slidesPerView: 7, spaceBetween: 16 } }, }) //内页二级当前高亮 $(function() { var d = setInterval(function() { var title = $.trim($("div[class*='e_breadcrumb'] .p_breadcrumbItem:eq(2)").text()); if(title != "") { $("div[class*='e_loop'] .menuBox .p_list .p_loopitem a:contains("+title+")").parents(".p_loopitem").addClass("active"); } },500); }); // 移动端 点击出现 $('.moveBtn').on('click', function () { // 按钮隐藏 $(this).css({ 'opacity': 0 }, 500) // 内容滑出 $('.contentBox').animate({ "left": 0 }, 500) }) // 移动端 点击收回 $('.backBtn').on('click', function () { // 按钮显示 $('.moveBtn').css({ 'opacity': 1 }, 500) // 内容收回 $('.contentBox').animate({ "left": "100%" }, 500) }) //内页项目案例 var swiper = new Swiper("#c_introl_detail_004-16728791120050 .e_loop-81 .swiper", { autoplay:true, pagination: { el: "#c_introl_detail_004-16728791120050 .e_loop-81 .swiper-pagination", clickable: true, }, navigation: { nextEl: "#c_introl_detail_004-16728791120050 .e_loop-81 .swiper-button-next", prevEl: "#c_introl_detail_004-16728791120050 .e_loop-81 .swiper-button-prev", }, breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 1, spaceBetween: 20 }, 768: { //当屏幕宽度大于等于768 slidesPerView: 1, spaceBetween: 20 }, 1024: { //当屏幕宽度大于等于768 slidesPerView: 2, spaceBetween: 20 }, 1280: { //当屏幕宽度大于等于1280 slidesPerView: 3, spaceBetween: 30 } }, }) //内页服务现场 var swiper = new Swiper("#c_introl_detail_004-1642055200562 .e_loop-56 .swiper", { autoplay:true, pagination: { el: "#c_introl_detail_004-1642055200562 .e_loop-56 .swiper-pagination", clickable: true, }, navigation: { nextEl: "#c_introl_detail_004-1642055200562 .e_loop-56 .swiper-button-next", prevEl: "#c_introl_detail_004-1642055200562 .e_loop-56 .swiper-button-prev", }, breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 1, autoplay:true, spaceBetween: 20 }, 768: { //当屏幕宽度大于等于768 slidesPerView: 1, autoplay:true, spaceBetween: 20 }, 1024: { //当屏幕宽度大于等于768 slidesPerView: 2, spaceBetween: 20 }, 1280: { //当屏幕宽度大于等于1280 slidesPerView: 3, autoplay:true, spaceBetween: 20 } }, }) //内页相关解决方案 var swiper = new Swiper("#c_introl_detail_004-16738640619750 .e_loop-95 .swiper", { autoplay:true, pagination: { el: "#c_introl_detail_004-16738640619750 .e_loop-95 .swiper-pagination", clickable: true, }, navigation: { nextEl: "#c_introl_detail_004-16738640619750 .e_loop-95 .swiper-button-next", prevEl: "#c_introl_detail_004-16738640619750 .e_loop-95 .swiper-button-prev", }, breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 2, autoplay:true, spaceBetween: 20 }, 768: { //当屏幕宽度大于等于768 slidesPerView: 2, autoplay:true, spaceBetween: 20 }, 1024: { //当屏幕宽度大于等于768 slidesPerView: 3, spaceBetween: 20 }, 1280: { //当屏幕宽度大于等于1280 slidesPerView: 4, autoplay:true, spaceBetween: 20 } }, }) //内页发展历程 var swiper = new Swiper("#c_introl_detail_004-1642055200562 .e_loop-102 .mySwiper", { spaceBetween: 10, slidesPerView: 6, freeMode: true, watchSlidesProgress: true, breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 2, autoplay:true, spaceBetween: 20 }, 768: { //当屏幕宽度大于等于768 slidesPerView: 2, autoplay:true, spaceBetween: 20 }, 1024: { //当屏幕宽度大于等于768 slidesPerView: 3, spaceBetween: 20 }, 1280: { //当屏幕宽度大于等于1280 slidesPerView: 6, autoplay:true, spaceBetween: 20 } }, }); var swiper2 = new Swiper(".mySwiper2", { slidesPerView: 1, autoplay:true, spaceBetween: 10, navigation: { nextEl: "#c_introl_detail_004-1642055200562 .e_loop-102 .swiper-button-next", prevEl: "#c_introl_detail_004-1642055200562 .e_loop-102 .swiper-button-prev", }, breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 1, autoplay:true, spaceBetween: 20 }, 768: { //当屏幕宽度大于等于768 slidesPerView: 1, autoplay:true, spaceBetween: 20 }, 1280: { //当屏幕宽度大于等于1280 slidesPerView: 1, autoplay:true, spaceBetween: 20 } }, thumbs: { swiper: swiper, }, }); //Wow.js if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ new WOW().init(); }; //滑动向上 function topMove(el, topTarget) { topTarget = topTarget || 20; $(el).css("position", "relative").hover(function() { $(this).stop().animate({top: -topTarget}, 300); }, function() { $(this).stop().animate({top: 0}, 300); }); }; $(function() { topMove("#c_static_001_P_4719-1671153018676 .e_bannerE-2 .swiper-slide-thumb-active"); }); //首页TAB切换 $(function(){ $("#c_static_001-1663248610782 .e_container-10 > .p_item:eq(0)").addClass("oncurrent"); $("#c_static_001-1663248610782 .e_container-10 > .p_item").click(function(){ $(this).addClass("oncurrent").siblings().removeClass("oncurrent"); var index = $(this).index(); var $parent = $(this).parents("#c_static_001-1663248610782 .e_container-10"); $parent.nextAll("div:lt(3)").hide().filter(":eq("+index+")").fadeIn(100); }); }); $(function(){ $('a,img').each(function(){ $(this).attr('title', ''); }); }); var img=$("img"); img.on("contextmenu",function(){return false;}); img.on("dragstart",function(){return false;}); //底部导航JS $(function(){ var _li =$('.top-nav-wrap').children('.top-nav'); _li.each(function(i, e) { $(this).addClass('btlink'+(i+1)); }); var _width = $(window).width(); if(_width < 768) { $('.top-nav-wrap .top-nav').each(function(){ var _this = $(this); _this.click(function(){ if(_this.hasClass('cur')) { _this.removeClass('cur'); _this.find('.footer-sub-hides').stop().slideUp(); }else { _this.addClass('cur').siblings().removeClass('cur'); _this.find('.footer-sub-hides').stop().slideDown().siblings().find('.footer-sub-hides').stop().slideUp(); _this.find('.footer-sub-hides').addClass('cur'); } }) }); } }) //招聘列表 $(function () { $('.joblist .job_item').on('click', function () { $(this).parent().siblings('.job_neirong').slideToggle() .parent().siblings('.joblist').children('.job_neirong').slideUp(); $(this).parent().parent().toggleClass("j_cur"); $(this).parent().parent().siblings('.j_cur').removeClass("j_cur"); }); // 默认第一条展开,不需要可以直接注释 // $('.position_list > .p_list > .joblist:nth-child(1) .job_item').trigger('click'); }); $(function(){ $(".btlink3").append("企业优势"); $(".btlink7").append("联系我们"); });