锘?/banner var mySwiper1 = new Swiper('.banner .swiper', { autoplay: { delay: 5000 }, speed: 2000, loop: true, // 寰幆妯″紡閫夐」 // 濡傛灉闇€瑕佸垎椤靛櫒 pagination: { el: '.banner .swiper-pagination', clickable: true, }, // 濡傛灉闇€瑕佸墠杩涘悗閫€鎸夐挳 navigation: { nextEl: '.banner .swiper-button-next', prevEl: '.banner .swiper-button-prev', }, }) //product var mySwiper2 = new Swiper('.products .swiper', { autoplay: false, speed: 2000, loop: false, // 寰幆妯″紡閫夐」 slidesPerView: 4, spaceBetween: 10, breakpoints: { 320: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?20 slidesPerView: 2, grid: { fill: 'row', rows: 2, }, spaceBetween: 20 }, 768: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?68 slidesPerView: 2, grid: { fill: 'row', rows: 2, }, spaceBetween: 20 }, 1280: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?280 slidesPerView: 4, spaceBetween: 15, grid: { fill: 'row', rows: 2, }, } }, // 濡傛灉闇€瑕佸垎椤靛櫒 // pagination: { // el: '.products .swiper-pagination', // clickable :true, // }, // 濡傛灉闇€瑕佸墠杩涘悗閫€鎸夐挳 navigation: { nextEl: '.products .swiper-button-next', prevEl: '.products .swiper-button-prev', }, }) //application var mySwiper3 = new Swiper('.application .swiper', { autoplay: { delay: 30000 }, speed: 2000, loop: true, // 寰幆妯″紡閫夐」 parallax: true, // 濡傛灉闇€瑕佸垎椤靛櫒 pagination: { el: '.application .swiper-pagination', clickable: true, }, }) //浜у搧鍒楄〃鍔犲 window.onload = function () { $('.proInfoConList li').each(function () { var index = $(this).index() var length = $(this).text().length if (40 < length && length < 100) { $('.proInfoConList').each(function () { $(this).find('li').eq(index).css('width', '200px') }) $('.productInfoTop li').eq(index).css('width', '200px') } else if (100 < length && length < 200) { $('.proInfoConList').each(function () { $(this).find('li').eq(index).css('width', '300px') }) $('.productInfoTop li').eq(index).css('width', '300px') } else if (300 < length && length < 400) { $('.proInfoConList').each(function () { $(this).find('li').eq(index).css('width', '400px') }) $('.productInfoTop li').eq(index).css('width', '400px') } }) } //鏁板瓧婊氬姩 $('.gd-count').countUp(); //瀵艰埅 $('.phoneLineBox').click(function () { $('.menu').addClass('phoneShow'); $('body').addClass('bodyActive') $('body').append('
') $('.bodyMask').click(function () { $('.menu').removeClass('phoneShow'); $('body').removeClass('bodyActive') $('.bodyMask').remove() }) }) $('.close').click(function () { $('.menu').removeClass('phoneShow'); $('body').removeClass('bodyActive') $('.bodyMask').remove() }) //鍏充簬鎴戜滑椤甸潰-鑽h獕 var mySwiper6 = new Swiper('.honor .swiper', { autoplay: { delay: 3000 }, speed: 2000, loop: true, // 寰幆妯″紡閫夐」 slidesPerView: 3, spaceBetween: 0, breakpoints: { 320: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?20 slidesPerView: 1, spaceBetween: 20 }, 768: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?68 slidesPerView: 3, spaceBetween: 30 }, 1280: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?280 slidesPerView: 3, spaceBetween: 100 } }, // 濡傛灉闇€瑕佸垎椤靛櫒 // pagination: { // el: '.strengthBox .swiper-pagination', // clickable :true, // }, // 濡傛灉闇€瑕佸墠杩涘悗閫€鎸夐挳 navigation: { nextEl: '.honor .swiper-button-next', prevEl: '.honor .swiper-button-prev', }, }) //鑱旂郴鎴戜滑椤甸潰-鐣欒█ $('.mesClick').click(function () { $('.mesInput').stop().fadeToggle() }) $('.inputClose').click(function () { $('.mesInput').stop().fadeOut() }) //鍔犲叆鎴戜滑椤甸潰-鎷涜仒 $('.joinContentBox').each(function () { $(this).find('.joinContentBoxLi li:eq(2)').click(function () { $(this).parent().next().stop().slideToggle() }) }) //浜у搧鍒楄〃-鍒楄〃 $(document).on('click', ".proInfoConList", function () { $(this).find('.proInfoConText').stop().slideToggle(); } ) /* $(this).live('click',function(){ $(this).find('.proInfoConText').stop().slideToggle(); }) */ //浜у搧鍒楄〃-鏍忕洰 $('.productMenuList').each(function () { $(this).find('.proIcon,.proMenuTops').click(function () { $(this).parent().next().stop().slideToggle() }) }) //浜у搧璇︽儏 var mySwiper7 = new Swiper('.proDetailConImg .swiper', { autoplay: { delay: 5000 }, speed: 2000, loop: true, // 寰幆妯″紡閫夐」 slidesPerView: 1, spaceBetween: 0, breakpoints: { 320: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?20 slidesPerView: 1, spaceBetween: 0 }, 768: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?68 slidesPerView: 1, spaceBetween: 0 }, 1280: { //褰撳睆骞曞搴﹀ぇ浜庣瓑浜?280 slidesPerView: 1, spaceBetween: 0 } }, // 濡傛灉闇€瑕佸垎椤靛櫒 // pagination: { // el: '.products .swiper-pagination', // clickable :true, // }, // 濡傛灉闇€瑕佸墠杩涘悗閫€鎸夐挳 navigation: { nextEl: '.proDetailConImg .swiper-button-next', prevEl: '.proDetailConImg .swiper-button-prev', }, }) //浜у搧璇︽儏tab $(function () { $('.proDetailInfoTag li').on('click', function () { var index = $(this).index(); $('.proDetailInfoCon .proTabBox').removeClass('proActive').eq(index).addClass('proActive') $(this).addClass('active').siblings('.proDetailInfoTag li').removeClass('active') }) }) //瀵艰埅 $('.menuBox li>a').each(function () { $(this).click(function () { // $('.secondMenu').hide(); // $(this).toggleClass('phoneIcon').next().toggle(); $(this).stop().toggleClass('phoneIcon').next().toggle().parent().siblings('li').find('.secondMenu').hide() }) }) /*//瀵艰埅 $('.phoneLineBox').click(function () { $('.menu').addClass('phoneShow'); $('body').addClass('bodyActive') $('body').append('
') $('.bodyMask').click(function () { $('.menu').removeClass('phoneShow'); $('body').removeClass('bodyActive') $('.bodyMask').remove() }) }) $('.close').click(function () { $('.menu').removeClass('phoneShow'); $('body').removeClass('bodyActive') $('.bodyMask').remove() })*/ $(function () { $('.list2020').on('click', function () { $('#product>a').addClass('phoneIcon') $('#product .secondMenu').show(); var index = 0 $('.secondList li').removeClass('productActive'); $('.secondList li').eq(index).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); $('.menu').addClass('phoneShow'); $('body').addClass('bodyActive') $('body').append('
') $('.bodyMask').click(function () { $('.menu').removeClass('phoneShow'); $('body').removeClass('bodyActive') $('.bodyMask').remove() }) $('#product .secondMenu .ulChange').show(); }) $('.list2021').on('click', function () { $('#product>a').addClass('phoneIcon') $('#product .secondMenu').show(); var index = 2 $('.secondList li').removeClass('productActive'); $('.secondList li').eq(index).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); }) $('.list20222').on('click', function () { $('#product>a').addClass('phoneIcon') $('#product .secondMenu').show(); var index = 5 $('.secondList li').removeClass('productActive'); $('.secondList li').eq(index).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); }) $('.list2024').on('click', function () { $('#product>a').addClass('phoneIcon') $('#product .secondMenu').show(); var index = 6 $('.secondList li').removeClass('productActive'); $('.secondList li').eq(index).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); }) $('.list2025').on('click', function () { $('#product>a').addClass('phoneIcon') $('#product .secondMenu').show(); var index = 4 $('.secondList li').removeClass('productActive'); $('.secondList li').eq(index).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); }) $('.list2026').on('click', function () { $('#product>a').addClass('phoneIcon') $('#product .secondMenu').show(); var index = 7 $('.secondList li').removeClass('productActive'); $('.secondList li').eq(index).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); }) $('.list2027').on('click', function () { $('#product>a').addClass('phoneIcon') $('#product .secondMenu').show(); var index = 1 $('.secondList li').removeClass('productActive'); $('.secondList li').eq(index).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); }) $('.list2022').on('click', function () { $('#appliction>a').addClass('phoneIcon') $('#appliction .secondMenu').show(); var scroll_offset = $('.header').offset(); //寰楀埌pos杩欎釜div灞傜殑offset锛屽寘鍚袱涓€硷紝top鍜宭eft $("body,html").animate({ scrollTop: scroll_offset.top //璁゜ody鐨剆crollTop绛変簬pos鐨則op锛屽氨瀹炵幇浜嗘粴鍔 }, 0); $('.menu').addClass('phoneShow'); $('body').addClass('bodyActive') $('body').append('
') $('.bodyMask').click(function () { $('.menu').removeClass('phoneShow'); $('body').removeClass('bodyActive') $('.bodyMask').remove() }) $('#appliction .secondMenu .ulChange').show(); }) }) $('.secondList li').each(function () { $(this).click(function () { var index = $(this).index(); $('.secondList li').removeClass('productActive'); $(this).addClass('productActive'); $('.secondListShows .secondListShow').removeClass('secondShowActive').eq(index).addClass('secondShowActive'); }) }) $('.menuClose').click(function () { $('.secondMenu').slideUp() }) $('.listShowTitle,.menuListTitle').click(function () { $(this).stop().toggleClass('phoneIcon').next().slideToggle() }) //灞忓箷楂樺害 var heightW = $(document).height() $('.mask').css('height', heightW) //鍒嗗垪 $('.secondListShow ul').each(function () { var length = $(this).find('li').length if (length > 8) { $(this).addClass('ulChange') } }) //瀵艰埅 $('.mask').click(function () { $('.secondMenu').slideUp() }) //鍐呴〉瀵艰埅 $('nav.pageMenu li a').each(function () { $(this).click(function () { $(this).addClass('on').parents().find('a').removeClass('on') }) }) var aboutUs = $('#about-us').offset().top - 50 var historys = $('#history').offset().top - 50 var advantage = $('#advantage').offset().top - 50 var honor = $('#honor').offset().top - 50 $(window).scroll(function () { var windowTop = $(window).scrollTop(); if (windowTop > aboutUs) { $('#pageMenu li').eq(0).addClass('on').siblings().removeClass('on') } if (windowTop > historys) { $('#pageMenu li').eq(1).addClass('on').siblings().removeClass('on') } if (windowTop > advantage) { $('#pageMenu li').eq(2).addClass('on').siblings().removeClass('on') } if (windowTop > honor) { $('#pageMenu li').eq(3).addClass('on').siblings().removeClass('on') } })