// 涓婄嚎璇峰垹闄や互涓 var swiper = new Swiper('.banner-container', { autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, pagination: { el: '.banner-pagination', clickable: true, }, on: { slideChangeTransitionStart: function () { }, slideChangeTransitionEnd: function () { $('.banner-container').find('.item').removeClass('animated fadeInLeft fadeInRight fadeInDown fadeInUp'); if (this.activeIndex == 0) { $('.banner .swiper-slide').eq(0).find('.ban_bg').addClass('animation').parent().siblings().find('.ban_bg').removeClass('animation'); $('.banner .swiper-slide').eq(0).find('.title1').addClass('animated fadeInLeft'); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.title3_1').addClass('animated fadeInLeft'); }, 200); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.more').addClass('animated fadeInLeft'); }, 500); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.banner2_img2').addClass('animated fadeInUp'); }, 500); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.banner2_img').addClass('animated fadeInDown'); }, 800); } else if (this.activeIndex == 1) { $('.banner .swiper-slide').eq(1).find('.ban_bg').addClass('animation').parent().siblings().find('.ban_bg').removeClass('animation'); $('.banner .swiper-slide').eq(1).find('.title2_1 ').addClass('animated fadeInLeft'); setTimeout(function () { $('.banner .swiper-slide').eq(1).find('.title1').addClass('animated fadeInLeft'); }, 400); setTimeout(function () { $('.banner .swiper-slide').eq(1).find('.title2_2').addClass('animated fadeInLeft'); }, 200); setTimeout(function () { $('.banner .swiper-slide').eq(1).find('.link_solid').addClass('animated fadeInLeft'); }, 400); setTimeout(function () { $('.banner .swiper-slide').eq(1).find('.s2_desc').addClass('animated fadeInLeft'); }, 400); setTimeout(function () { $('.banner .swiper-slide').eq(1).find('.more').addClass('animated fadeInLeft'); }, 600); setTimeout(function () { $('.banner .swiper-slide').eq(1).find('.banner3_right_img').addClass('animated fadeInDown'); }, 500); setTimeout(function () { $('.banner .swiper-slide').eq(1).find('.banner3_date').addClass('animated fadeInLeft'); }, 1000); } else if (this.activeIndex == 2) { $('.banner .swiper-slide').eq(2).find('.ban_bg').addClass('animation').parent().siblings().find('.ban_bg').removeClass('animation'); $('.banner .swiper-slide').eq(2).find('.title1').addClass('animated fadeInLeft'); $('.banner .swiper-slide').eq(2).find('.ban_bg').addClass('animation').parent().siblings().find('.ban_bg').removeClass('animation'); setTimeout(function () { $('.banner .swiper-slide').eq(2).find('.link_solid').addClass('animated fadeInLeft'); }, 200); setTimeout(function () { $('.banner .swiper-slide').eq(2).find('.title3_p').eq(0).addClass('animated fadeInLeft'); }, 400); setTimeout(function () { $('.banner .swiper-slide').eq(2).find('.title3_p').eq(1).addClass('animated fadeInLeft'); }, 600); setTimeout(function () { $('.banner .swiper-slide').eq(2).find('.title3_p').eq(2).addClass('animated fadeInLeft'); }, 800); } }, }, }); $('.banner .swiper-slide').eq(0).find('.ban_bg').addClass('animation').parent().siblings().find('.ban_bg').removeClass('animation'); $('.banner .swiper-slide').eq(0).find('.title1').addClass('animated fadeInLeft'); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.title3_1').addClass('animated fadeInLeft'); }, 200); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.more').addClass('animated fadeInLeft'); }, 500); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.banner2_img2').addClass('animated fadeInUp'); }, 500); setTimeout(function () { $('.banner .swiper-slide').eq(0).find('.banner2_img').addClass('animated fadeInDown'); }, 800); $('.ban1 .container').mousemove(function (e) { var x = e.pageX / $(window).width() - 0.5; var y = (e.pageY - $(window).scrollTop()) / $(window).height() - 0.5; var intensity = 20; $('.banner1_img img').css({ 'transform': 'translate3d(' + -x * intensity + 'px, ' + -y * intensity + 'px, 0)' }); }); var swiper = new Swiper('.pdt_det_container', { pagination: { el: '.pdt_det_pagination', clickable: true, }, }); var lilen = $('.ser_pdt-container .swiper-slide').length; var alltext = "/0" + lilen; var numactive = "0"; $('.num_all').text(alltext); var swiper = new Swiper('.ser_pdt-container', { navigation: { nextEl: '.ser_pdt-container .swiper-button-next', prevEl: '.ser_pdt-container .swiper-button-prev', }, pagination: { el: '.ser_pdt_pagination', type: 'fraction', clickable: true, }, on: { slideChangeTransitionEnd: function () { $('.num_active').text("0" + parseInt(this.activeIndex + 1)); }, }, }); var swiper_pro = new Swiper('.series-list-container', { // initialSlide :1, preventClicks: true, scrollbar: { el: '.series-scrollbar', draggable: true, }, preventLinksPropagation: true, slidesPerView: 5, mousewheel: true, paginationClickable: true, observer: true, spaceBetween: 0, on: { touchEnd: function (event) { event.stopPropagation(); event.preventDefault(); }, }, breakpoints: { 1430: { slidesPerView: 4, }, 990: { slidesPerView: 3, }, // 640: { // slidesPerView: 3, // }, } }); abdeve(); function abdeve() { // if (window.addEventListener) { // var range = document.querySelector("#range"); // var circle = document.querySelectorAll("circle")[0]; // if (range && circle) { // range.addEventListener("change", function () { // var percent = this.value / 100, perimeter = Math.PI * 2 * 170; // circle.setAttribute('stroke-dasharray', perimeter * percent + " " + perimeter * (1 - percent)); // }); // } // } var swiper = new Swiper('.ab_deve_container', { slidesPerView: 3, // initialSlide: 1, centeredSlides: true, navigation: { nextEl: '.ab_deve_container .swiper-button-next', prevEl: '.ab_deve_container .swiper-button-prev', }, on: { slideChangeTransitionEnd: function () { var len = $('.ab_deve_container .swiper-slide').size(); var _thisAct = this.activeIndex + 1; var percent = _thisAct / len, perimeter = Math.PI * 2 * 170; var circle = document.querySelectorAll("circle")[0]; circle.setAttribute('stroke-dasharray', perimeter * percent + " " + perimeter * (1 - percent)); }, }, breakpoints: { 768: { slidesPerView: 1, initialSlide: 1, }, } }); }; $(window).resize(function () { abdeve(); }); var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 100, mobile: true, live: true, duration: 600 }); wow.init(); $('.att_cnt .info .more').click(function () { $(this).toggleClass('active'); }); $('.search_pdt .form_sub .til .sub_sel').click(function () { $(this).addClass('active').siblings().removeClass('active'); $('.search_pdt .box .tab-con').eq($(this).index()).fadeIn().siblings('.tab-con').hide(); }); var selectInputs = []; $('.form-group .bl_cnt .sele_grup .sub_sel, .search_results ul li.sele_grup .select-item').click(function (th) { var i = 0; if ($(this).parents('.bl_cnt, .sele_grup').hasClass('active')) { selectInputs.shift(); $(this).parents('.bl_cnt, .sele_grup').removeClass('active').addClass('disabled'); $(".form-group .bl_cnt .sele_grup, .search_results ul li.sele_grup").find('input,select').attr('disabled', 'disabled'); return false; } else { selectInputs.push(th); if (selectInputs.length > 2) { selectInputs.shift(); $(this).parents('.bl_cnt, .sele_grup').removeClass('active'); return false; } else { $(this).parents('.bl_cnt, .sele_grup').removeClass('disabled').addClass('active'); $(this).parents('.bl_cnt, .sele_grup').find('input,select').removeAttr('disabled'); } if (selectInputs.length > 1) { console.log('1') } } }); $(function () { $('.pdt-show-list ul > li').each(function (i, d) { var data_img = $(d).find('.listimg figure').attr('data-img'); $(d).find('.listimg img').attr('src', data_img); }); // function swiscroll(){ // var intro = $('.banner-container'); // var introli = $('.banner .swiper-slide'); // if($(window).width() < 768){ // intro.css("height", $(window).height()); // introli.css("height", $(window).height()); // } // } // swiscroll(); // $(window).resize(function(){ // if($(window).width() < 768){ // swiscroll(); // } // }); }) $('.pdt-show-list ul > li .box ol li').hover(function () { var value = $(this).attr('data-img'); var listimg = $(this).parents('.box').siblings('.listimg').find('figure').attr('data-img'); if (value.length > 0) { $(this).parents('.box').siblings('.listimg').find('img').attr('src', value); } else { $(this).parents('.box').siblings('.listimg').find('img').attr('src', listimg); } }); (function () { var value = $('.pdt-show-list ul > li .box ol li').eq(0).attr('data-img'); $('.pdt-show-list ul > li .box ol li').parents('.box').siblings('.listimg').find('img').attr('src', value); })(jQuery); $(".form-group .bl_cnt .sele_grup").parents('.bl_cnt').addClass('disabled'); $(".form-group .bl_cnt .sele_grup").find('input,select').attr('disabled', 'disabled'); //var sele_grup = $('.search_results ul li.sele_grup').find('input').val(); //var sele = $('.search_results ul li.sele_grup').find('select').attr('checked'); //if(sele_grup == ''){ // $(".search_results ul li.sele_grup").addClass('disabled'); // $(".search_results ul li.sele_grup").find('input,select').attr('disabled','disabled'); //} $(".search_results ul li.sele_grup").each(function (i, n) { var sele_grup = $(n).children('.select-content').find('input').val();; var sele = $(n).find('select option:selected').val(); if (sele == '') { $(n).addClass('disabled'); $(n).find('select').attr('disabled', 'disabled'); } else { $(n).addClass('active'); } }); $('.form-group .bl_cnt').last().hide(); $('.from_zk_btn').click(function () { if ($(this).prev('.bl_cnt').is(':visible')) { $(this).text('灞曞紑鏇村绮惧噯鏉′欢') } else { $(this).text('鏀惰捣绮惧噯鏉′欢'); } $('.form-group .bl_cnt').last().slideToggle(); }); $('.about_info .att_cnt .info .more').click(function () { $(this).siblings('.textbox').css('height', 'initial'); $(this).hide(); }); /*$('.factory_cnt ul li').click(function () { var _this = $(this).index(); $('.factory_fixed').fadeIn(); jQuery(".factory_layer").slide({ mainCell: ".bd ul", effect: "fold", defaultIndex: _this, pnLoop: true }); }); $('.factory_fixed .factory_layer').click(function (event) { event.stopPropagation(); }); $('.factory_fixed .close-btn, .factory_fixed').click(function () { $('.factory_fixed').hide(); });*/ var solu_bz_nav = $('.solu_bz_nav ul li'); var solunav_li = $('.solu_icon_nav ul li'); var solutabcon = $('.ser_bz_solu .tab_con'); solu_nav('mouseover', solu_bz_nav, solutabcon, 'active'); solu_nav('click', solunav_li, solutabcon, 'active'); function solu_nav(cli, conli, tab_con, classname) { conli.bind(cli, function () { var _this = $(this); var tabcon = tab_con; setTimeout(function () { _this.addClass(classname).siblings().removeClass(classname); tabcon.stop().hide().siblings('.tab_con').eq(_this.index()).stop().fadeIn(); }, 100); }); } $('.scroll_top').click(function () { $('body,html').animate({ scrollTop: 0 }, 400) }); $('.pdt_list .title_nav ul li').click(function () { $(this).addClass('active').siblings().removeClass('active'); $('.pdt_list .tab_content').find('.tab-con').eq($(this).index()).fadeIn(200).siblings('.tab-con').hide(); }); $('.common_problem ul li .head').click(function () { $(this).parent('li').stop().toggleClass('active'); $(this).find('i').stop().toggleClass('icon-tianjia').stop().toggleClass('icon-jian'); }); tabs($('.idx_news .title_nav ul li')); tabs($('.ser-cnt-tab ul li')); tabs($('.down_title ul li')); function tabs($til) { $til.on('click', function () { $(this).addClass('active').siblings().removeClass('active'); $(this).parents().siblings('.tab_content').find('.tab-con').eq($(this).index()).fadeIn(200).siblings('.tab-con').hide(); }) }; selec(); function selec() { $('.obtain_btn').click(function () { $('.obtain_main').fadeIn(); $('.pdt_det_main .obtain_cnt .pdt_int_list h3').text($('.pdt_det_top .box h3').text()) }); $('body, .close_btn').click(function () { $('.obtain_main').hide(); }); $('.obtain_cnt,.obtain_btn').click(function (event) { event.stopPropagation(); }); $('.pdt_detimg_btn').click(function () { $('.pdt_det_lay_img').addClass('open'); $('.pdt_det_lay_img').find('img').attr('src', $(this).attr('src')); }); $('.close_btn').click(function () { $('.pdt_det_lay_img').removeClass('open'); }); } $('.search_pdt .form_sub .box .form-group .grup_cnt input').click(function () { $(this).parent().addClass('active'); }); $(".xinpian_select").change(function () { var datax = $(this).find('option:selected').attr('data-x'), datay = $(this).find('option:selected').attr('data-y'); $("input[name='startxp']").attr('value', datax); $("input[name='endxp']").attr('value', datay); }) var selinp = $('.search_results .til .sub_sel input'); selinp.click(function () { if ($(this).is(':checked')) { $('.search_results').find('.tab-con').eq($(this).parent().index()).show().siblings('.tab-con').hide(); } }); for (var i = 0; i < $('.search_results .til .sub_sel').length; i++) { if ($('.search_results .til .sub_sel').eq(i).find('input').is(':checked')) { $('.search_results .til .sub_sel').eq(i).addClass('active'); $('.search_results').find('.tab-con').eq(i).show().siblings('.tab-con').hide(); }; } $('.pg-list-buy ul li .sele_btn span.btn').click(function () { if ($(this).parent('.sele_btn').siblings('.select-content').hasClass('active')) { $(this).parent('.sele_btn').siblings('.select-content').removeClass('active'); } else { $(this).parent('.sele_btn').siblings('.select-content').addClass('active'); }; }) function banSize() { var sreenWid = $(window).width(); var sreenHei = $(window).height(); var yu = sreenHei / 1.3; if (sreenWid > 1920) { $('.banner .swiper-slide').css('height', yu); } else if (sreenWid < 768) { $('.banner .swiper-slide').css('height', sreenHei); } else if (sreenWid < 1439) { $('.banner .swiper-slide').css('height', '650'); } else if (sreenWid < 1920) { $('.banner .swiper-slide').css('height', '780'); } }; banSize(); window.onresize = function () { banSize(); }; function jrlad_js() { var name = /^[\u4e00-\u9fa5a-z]+$/; var tel = /^[1][345678]\d{9}$/; var reg = /^(鐢穦濂?$/ if (!name.test($('#jrlad_name').val())) { alert("绉板懠濉啓涓嶆纭摝"); $('#jrlad_name').focus(); return false; }; if (!reg.test($('#jrlad_email').val())) { alert("璇疯緭鍏ユ纭€у埆鍝︼紝鈥樼敺鈥欐垨鈥樺コ鈥?); $('#jrlad_email').focus(); return false; }; if (!tel.test($('#jrlad_tel').val())) { alert("璇疯緭鍏ユ纭殑鎵嬫満鍙凤紒"); $('#jrlad_tel').focus(); return false; }; if ($('#files').val() == '') { alert("璇蜂笂浼犵畝鍘嗗摝"); $('#files').focus(); return false; }; }; $(function (){ $(".click_show_").click(function () { if($(this).find("span").text() === "灞曞紑鎼滅储妗?) { $(this).find("span").text("鏀惰捣鎼滅储妗?); }else { $(this).find("span").text("灞曞紑鎼滅储妗?); } $(this).find("i").toggleClass("active") $(".click_show").stop().slideToggle(); }) })