// 移动端 点击出现 $('.wy_Cate').on('click', function () { // 按钮隐藏 $(this).css({ 'opacity': 0 }, 500) // 内容滑出 $('.wy_CateList').animate({ "left": 0 }, 500) }) // 移动端 点击收回 $('.wy_backBtn').on('click', function () { // 按钮显示 $('.wy_Cate').css({ 'opacity': 1 }, 500) // 内容收回 $('.wy_CateList').animate({ "left": "100%" }, 500) }) /*分类高亮*/ $(function() { var pathName = window.location.pathname; // 获得路径信息 var subUrl = pathName.substring(pathName.lastIndexOf("/")); $(".s_button3").each(function() { // 遍历a链接的路径 var aLinkUrl = $(this).attr("href"); // 得到a链接的路径 if (aLinkUrl == pathName) { $(this).addClass("wy_Click"); return; }; }); }); /*end*/ $require(['swiper'], function () { /*产品中心*/ new Swiper("#home_hx", { //spaceBetween:10, loop: true, speed: 700, autoplay: { delay: 3000, disableOnInteraction: false, }, slidesPerView: 'auto', breakpoints: { 500: { slidesPerView:2, spaceBetween:15, }, 1024: { slidesPerView:3, spaceBetween:20, }, 1200: { slidesPerView:4, spaceBetween:26, }, }, navigation: { nextEl: '.hx_right', prevEl: '.hx_left', }, pagination: { el: '.hx_page', clickable: true, clickableClass : 'hx_page', }, observer: true, observeParents: true, }); /*首页关于我们*/ new Swiper("#home_about", { //spaceBetween:10, loop: true, speed: 700, //autoplay: { // delay: 3000, // disableOnInteraction: false, //}, slidesPerView: 'auto', breakpoints: { 500: { slidesPerView:2, spaceBetween:10, }, 1024: { slidesPerView:3, spaceBetween:15, }, 1200: { slidesPerView:4, spaceBetween:20, }, }, navigation: { nextEl: '.about_right', prevEl: '.about_left', }, observer: true, observeParents: true, }); new Swiper('#certify .swiper-container', { watchSlidesProgress: true, slidesPerView: 'auto', centeredSlides: true, loop: true, // autoplay:true, loopedSlides: 5, navigation: { nextEl: '.video_right', prevEl: '.video_left', }, /*pagination: { el: '.swiper-pagination', clickable :true, },*/ on: { progress: function(progress) { for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideProgress = this.slides[i].progress; modify = 1; if (Math.abs(slideProgress) > 1) { modify = (Math.abs(slideProgress) - 1) * 0.2 + 1; } translate = slideProgress * modify * 180 + 'px'; scale = 1 - Math.abs(slideProgress) / 5; zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); if (Math.abs(slideProgress) > 3) { slide.css('opacity', 0); } } }, setTransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }); }); if(isFrontEnv()){ $(function(){ /*首页解决方案*/ $("#c_static_001-1672392803558 .e_loop-1 .p_loopitem").eq(0).show().siblings().hide(); $("#c_static_001-1672392803558 .e_loop-2 .p_loopitem").eq(0).addClass("wy_Active"); $("#c_static_001-1672392803558 .e_loop-2 .p_loopitem").click(function(){ var i = $(this).index(); $(this).addClass("wy_Active").siblings().removeClass("wy_Active"); $("#c_static_001-1672392803558 .e_loop-1 .p_loopitem").eq(i).show().siblings().hide(); }); /*首页产品中心*/ $("#c_static_001-16675449405230 .e_loop-11 .p_loopitem").eq(0).show().siblings().hide(); $("#c_static_001-16675449405230 .e_loop-10 .p_loopitem").eq(0).addClass("wy_Active"); $("#c_static_001-16675449405230 .e_loop-10 .p_loopitem").click(function(){ var i = $(this).index(); $(this).addClass("wy_Active").siblings().removeClass("wy_Active"); $("#c_static_001-16675449405230 .e_loop-11 .p_loopitem").eq(i).show().siblings().hide(); }); }); } /*end*/ new WOW().init();