$(function() { $("header nav a.home").addClass("active"); var kv_slider = new Swiper('.kv .swiper-container', { autoplay: { delay: 7000, disableOnInteraction: false, }, loop: true, pagination: { el: '.kv .dot', clickable: true, }, on:{ init: function(){ $(".kv .box .txt_body h1").hide().removeClass("animated fadeInUp"); $(".kv .box .txt_body h2").hide().removeClass("animated fadeInUp"); $(".kv .box .txt_body a.more").hide().removeClass("animated fadeInUp"); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("h1").show().addClass("animated fadeInUp"); },600); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("h2").show().addClass("animated fadeInUp"); },1000); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("a.more").show().addClass("animated fadeInUp"); },1400); }, slideChangeTransitionEnd: function(){ $(".kv .box .txt_body h1").hide().removeClass("animated fadeInUp"); $(".kv .box .txt_body h2").hide().removeClass("animated fadeInUp"); $(".kv .box .txt_body a.more").hide().removeClass("animated fadeInUp"); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("h1").show().addClass("animated fadeInUp"); },600); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("h2").show().addClass("animated fadeInUp"); },1000); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("a.more").show().addClass("animated fadeInUp"); },1400); } } }); var kvnum = $(".kv .dot span").length; if(kvnum <= 1) { $(".kv .dot").hide(); $(".kv .swiper-container .swiper-slide").addClass("swiper-no-swiping"); kv_slider.autoplay.stop(); } setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("h1").show().addClass("animated fadeInUp"); },600); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("h2").show().addClass("animated fadeInUp"); },1000); setTimeout(function(){ $(".kv .swiper-slide-active .box .txt_body").find("a.more").show().addClass("animated fadeInUp"); },1400); $(".solution .solu_tab ul li").click(function(){ var index = $(".solution .solu_tab ul li").index($(this)); $(".solution .solu_tab ul li").removeClass("active").eq(index).addClass("active"); $(".solution .con_list .solu_con").stop(false,true); $(".solution .con_list .solu_con").hide().eq(0).fadeIn(); }).eq(0).click(); $(".solution .tab a").click(function(){ var index = $(".solution .tab a").index($(this)); $(".solution .tab a").removeClass("active").eq(index).addClass("active"); //获取解决方案列表 var cid=$(this).attr('cid'); var cname=$(this).text(); getSolutionList(cid,cname); }).eq(0).click(); $(".product .tab a").click(function(){ var index = $(".product .tab a").index($(this)); $(".product .tab a").removeClass("active").eq(index).addClass("active"); //获取产品列表 var cid=$(this).attr('cid'); var cname=$(this).text(); getProList(cid,cname); }).eq(0).click(); $(".product .content .list .box_list .box").hover(function(){ $(".product .content .list .box_list .box .mask").stop(false,true); $(this).find(".mask").slideDown(); },function(){ $(".product .content .list .box_list .box .mask").stop(false,true); $(this).find(".mask").slideUp(); }); var about_slider = new Swiper('.about .slider_rt .swiper-container', { effect:"fade", fadeEffect: { crossFade: true, }, autoplay: { delay: 2000, disableOnInteraction:true, }, observer:true, observeParents:true, pagination: { el: '.about .slider_rt .dot', clickable: true, }, }); }); //获取解决方案列表 function getSolutionList(cid,cname) { let srcs=[]; if (cid!="") { $.ajax({ type: "POST", url: "/index.php/index/index/get_solution_list.html", data: "cid=" + cid, cache: false, success: function(data) { srcs = data; var html=""; for(let i=0;i<=srcs.length-1;i++){ let src = srcs[i]; html+='
' + '
' + '
' + '' + '
' + '
' + '
' + '

'+cname+'

' + '

'+src.tit+'

' + '

'+src.text+'

' + '立即探索' + '
' + '
' + '
' + '
'; } $("#divSolList").html(html); //soluslider.init(); var soluslider = new Swiper('.solution .tablist .slider .swiper-container', { // autoplay: { // delay: 6000, // disableOnInteraction:true, // }, navigation: { nextEl: '.solution .tablist .slider .right', prevEl: '.solution .tablist .slider .left', }, observer:true, observeParents:true, breakpoints: { 640: { pagination: { el: '.solution .tablist .slider .dot', clickable: true, }, }, } }); } }) } } //获取产品列表 function getProList(cid,cname) { let srcs=[]; if (cid!="") { $.ajax({ type: "POST", url: "/index.php/index/index/get_product_list.html", data: "cid=" + cid, cache: false, success: function(data) { srcs = data; var html=""; for(let i=0;i<=srcs.length-1;i++){ let src = srcs[i]; html+='
' + '' + '
' + '' + '
' + '
' + '
'+cname+'
' + '
'+src.tit+'
' + '

更多信息

' + '
' + '
' + '
'; } $("#divProList").html(html); var prodslider = new Swiper('.product .tablist .slider .swiper-container', { slidesPerView: 3, spaceBetween: 18, slidesPerGroup: 3, autoplay: { delay: 6000, disableOnInteraction:true, }, navigation: { nextEl: '.product .tablist .slider .right', prevEl: '.product .tablist .slider .left', }, observer:true, observeParents:true, breakpoints: { 640: { slidesPerView: 1, spaceBetween: 0, slidesPerGroup: 1, pagination: { el: '.product .tablist .slider .dot', clickable: true, }, }, } }); } }) } }