$(document).ready(function(){ // 首页搜索按钮 $(".search_btn").click(function () { $(".search_view").addClass("active") }) // 首页轮播 var index_banner = new Swiper(".index_banner", { autoplay: { delay: 3000, disableOnInteraction: false, }, loop: false, effect: 'fade', pagination: { el: ".index_banner .index_banner_pagination", clickable :true, }, }); // 鼠标移入停止自动滚动 $('.index_banner .swiper-slide').mouseenter(function() { index_banner.autoplay.stop(); }) // 鼠标移出开始自动滚动 $('.index_banner .swiper-slide').mouseleave(function() { index_banner.autoplay.start(); }) // 首页合作滚动 // 上 jQuery(".index_hezuo_view").slide({ mainCell: ".item1", autoPlay: true, effect: "leftMarquee", vis: '6', interTime: 30, trigger: "click", easing: 'swing', }); // 下 jQuery(".index_hezuo_view").slide({ mainCell: ".item2", autoPlay: true, opp: true, effect: "leftMarquee", vis: '6', interTime: 30, trigger: "click", easing: 'swing', }); // 首页观点切换 $(".index_guandian_view .tab_view .tab_item").hover(function () { console.log($(this)) $(".index_guandian_view .tab_view .tab_item").removeClass("active"); $(".con_view").hide(); $(this).addClass("active"); $(this).next().show(); $(this).next().find(".con_box").addClass("active"); $(this).prev().hide(); $(this).prev().find(".con_box").removeClass("active"); }) // 首页观点切换左侧内容 $(".index_guandian_view .con_item .item").hover(function () { var editDom = $(this).parents(".con_box").find(".l_view") editDom.find("p").html($(this).find(".time").html()) editDom.find(".title_p").html($(this).find(".con_nr").html()) editDom.find(".con_t").html($(this).find(".hide_content").html()) editDom.attr("href",$(this).attr("href")) }) // 首页产品切换 var product_slide = new Swiper(".product_item_view", { direction: 'vertical', spaceBetween: '-18%', loop: true, autoplay: { delay: 3000, disableOnInteraction: false, stopOnLastSlide: true, }, on: { // 移动结束 transitionEnd: function () { var _index = +$('.index_product_view .item.swiper-slide.swiper-slide-active').attr('data-swiper-slide-index') $(".index_product_view .jd_view").find("span").eq(_index).addClass("active").siblings().removeClass("active") $(".index_product_view .product_item_view .img_item").find('.img_view').eq(_index).addClass("active").siblings().removeClass("active") }, } }); // 首页产品点击指示点 $(".index_product_view .jd_view span").click(function () { product_slide.slideTo($(this).index() + 1, 300, false);//切换到第一个slide,速度为1秒 }) // 下面是需要合并的 // 产品中心 客户价值切换 $("#product_view .product_value .item").hover(function () { var _index = $(this).index() $("#product_view .product_value .item").siblings().removeClass("active").eq(_index).addClass("active") $("#product_view .product_value .con_b_view .b_view").removeClass("active").eq(_index).addClass("active") }) // 技术支持轮播 var jishu_con_box = new Swiper("#about_view .jishu .con_box", { loop: true, slidesPerView: 'auto', grabCursor: true, navigation: { nextEl: '#about_view .jishu .swiper-button-next', prevEl: '#about_view .jishu .swiper-button-prev', }, }); // 案例中心 客户价值 $(".solution_value .item").hover(function () { var _index = $(this).index() $(".solution_value .item").siblings().removeClass("active").eq(_index).addClass("active") $(".solution_value .con_b_view .b_view").removeClass("active").eq(_index).addClass("active") }) $(".solution_value .r_view .b_btn").click(function () { $(".solution_value .r_view .one_view").css({ "transform": "translateY(-75%)" }) }) $(".solution_value .r_view .t_btn").click(function () { $(".solution_value .r_view .one_view").css({ "transform": "translateY(0%)" }) }) // 相关案例-客户价值 var xiangguan_solution_value = new Swiper(".xiangguan_solution_value .r_view", { direction: 'vertical', slidesPerView: 'auto', autoHeight: true, // loop: true, // autoplay: { // delay: 3000, // disableOnInteraction: false, // stopOnLastSlide: true, // }, navigation: { nextEl: '.xiangguan_solution_value .con_b_view .b_btn', prevEl: '.xiangguan_solution_value .con_b_view .t_btn', }, }); })