require(["jquery", "imagesloaded", "velocity.ui", "velocity", "swiper", "slick", "resizend", "nicescroll"], function (domReady, imagesLoaded, velocity) { var mySwiper; var mySwiper1; var mySwiper2; var mySwiper3; var mySwiper4; var mySwiper5; var mySwiper6; var mySwiper7; var mySwiper71; var mySwiper8; var mySwiper9; var mySwiper10; var pagew = $(document).outerWidth(true) + (window.innerWidth - document.body.clientWidth); var pageh = $(window).innerHeight(); $(window).on("resizeEnd", function (event) { repage_com(); }); var loadImg = imagesLoaded(".cp_04_c"); loadImg.on("done", function () { try { $(".cp_04_c ul li").each(function () { if ($(this).find("em.em1").height() < $(this).find("em.em2").height()) { $(this).find("em.em1").css({ "margin-top": ($(this).find("em.em2").height() - $(this).find("em.em1").height()) / 2 + "px" }); } }); $(".cp_04_c ul li").velocity("transition.expandIn", { stagger:200 }); } catch (e) { } $(".loading").remove(); }); try { $(".menu em").click(function () { if ($(this).attr("class") != "on") { $(this).addClass("on"); if (pagew > 1300) { $(".topfr").stop(true, true).velocity({ "top": "0px" }); } else { $(".menu_li").stop(true, true).slideDown(); } } else { $(this).removeClass("on"); if (pagew > 1300) { $(".topfr").stop(true, true).velocity({ "top": "-69px" }); } else { $(".menu_li").stop(true, true).slideUp(); } } }); } catch (e) { } try { mySwiper1 = new Swiper('.cp_03_slide', { slidesPerView: "3", speed: 1000, spaceBetween:20, prevButton: '.cp_03_prev', nextButton: '.cp_03_next' }); var cp_03_l_on = -1; $(".cp_03_l ul li").each(function (i, e) { if ($(this).attr("class") == "on") { cp_03_l_on = i; } $(this).click(function () { if (cp_03_l_on != i) { $(this).addClass("on"); $(this).closest("ul").find("li").eq(cp_03_l_on).removeClass("on"); mySwiper1.removeAllSlides(); $(this).find(".cp_03l_hid ul li").each(function () { mySwiper1.appendSlide('
' + $(this).html() + '
') }); mySwiper1.onResize(); cp_03_l_on = i; } }); }); } catch (e) { } try { mySwiper2 = new Swiper('.fzlc_02_slide', { slidesPerView: "4", speed: 1000, spaceBetween:30, prevButton: '.fzlc_03_prev', nextButton: '.fzlc_03_next', }); if (pagew > 900) { var fzlc_02_num1 = 0; var fzlc_02_num2 = 0; $(".fzlc_02_slide .swiper-slide").each(function () { if (fzlc_02_num1 < ($(this).find(".fzlc_02_txt").height() + $(this).find(".fzlc_02_img").height() + $(this).find(".fzlc_02_info").height())) { fzlc_02_num1 = $(this).find(".fzlc_02_txt").height() + $(this).find(".fzlc_02_img").height() + $(this).find(".fzlc_02_info").height(); } if (fzlc_02_num2 < $(this).find(".fzlc_02_info").height()) { fzlc_02_num2 = $(this).find(".fzlc_02_info").height(); } }); $(".fzlc_02_slide .swiper-slide").each(function () { $(this).css({ "height": (fzlc_02_num1 * 1.4 + 20) + "px" }); }); $(".fzlc_02_slide .swiper-slide:even").each(function () { $(this).find(".fzlc_02_info").css({ "position": "absolute", "left": "0px", "top": fzlc_02_num2 - $(this).find(".fzlc_02_info").height() + "px" }); $(this).find(".fzlc_02_img").css({ "position": "absolute", "left": "0px", "top": fzlc_02_num2 + "px" }); $(this).find(".fzlc_02_txt").css({ "position": "absolute", "left": "0px", "top": fzlc_02_num2 + ($(this).find(".fzlc_02_img").height() + 20) + "px" }); }); $(".fzlc_02_slide .swiper-slide:odd").each(function () { $(this).find(".fzlc_02_txt").css({ "margin-top": (fzlc_02_num2 - $(this).find(".fzlc_02_txt").height() - 20) + "px", "margin-bottom": "20px" }); }); } else { $(".fzlc_02_slide .swiper-slide").each(function () { $(this).css({ "height": "auto" }); }); $(".fzlc_02_slide .swiper-slide:even").each(function () { $(this).find(".fzlc_02_info").css({ "position": "relative", "left": "0px", "top":"0px" }); $(this).find(".fzlc_02_img").css({ "position": "relative", "left": "0px", "top": "0px" }); $(this).find(".fzlc_02_txt").css({ "position": "relative", "left": "0px", "top": "0px" }); }); $(".fzlc_02_slide .swiper-slide:odd").each(function () { $(this).find(".fzlc_02_txt").css({ "margin-top":"0px", "margin-bottom": "20px" }); }); } } catch (e) { } try { $(".qywh_02c_c").each(function (i, e) { var qywh_02c_c_on = -1; $(this).find(".fl ul li").each(function (a,b) { if ($(this).attr("class").indexOf("on") > -1) { $(this).closest(".qywh_02c_c").find(".qywh_02c_r").html($(this).find(".qywh_02c0_hid").html()); qywh_02c_c_on = a; } $(this).click(function () { if (qywh_02c_c_on != a) { $(this).addClass("on"); $(this).closest("ul").find("li").eq(qywh_02c_c_on).removeClass("on"); $(this).closest(".qywh_02c_c").find(".qywh_02c_r").html($(this).find(".qywh_02c0_hid").html()); qywh_02c_c_on = a; } }); }); }); } catch (e) { } try { mySwiper3 = new Swiper('.spzx_01c_slide', { slidesPerView: "1", speed: 1000, pagination: '.spzx_01c_sp', paginationClickable: true }); } catch (e) { } try { mySwiper4 = new Swiper('.cp_01_slide', { slidesPerView: "1", speed: 1000, pagination: '.cp_01_sp', paginationClickable: true }); } catch (e) { } try { mySwiper5 = new Swiper('.rzdr_01_slide', { slidesPerView: "1", speed: 1000, prevButton: '.rzdr_01_prev', nextButton: '.rzdr_01_next', }); } catch (e) { } try { mySwiper6 = new Swiper('.rzdr_02c_slide', { slidesPerView: "4", speed: 1000, autoplay: 3000, loop:true, spaceBetween: 30, prevButton: '.rzdr_02c_prev', nextButton: '.rzdr_02c_next', }); } catch (e) { } try { var zzzm_01_t_on = -1; mySwiper7 = new Swiper('.zzzm_01c_slide', { slidesPerView: "3", speed: 1000, spaceBetween: 60, centeredSlides:true, autoplay:3000, loop:true, prevButton: '.zzzm_01_prev', nextButton: '.zzzm_01_next' }); mySwiper7.slideTo(1); $(".zzzm_01_t ul li").each(function (i, e) { if ($(this).attr("class") == "on") { mySwiper7.removeAllSlides(); $(this).find(".zzzm_01_hid a").each(function () { mySwiper7.appendSlide('
' + $(this).html() + '
') }); if ($(this).find(".zzzm_01_hid a").length > 1) { mySwiper7.slideTo(1); } if (pagew > 900) { if ($(this).find(".zzzm_01_hid a").length < 3) { $(".zzzm_01_prev").hide(); $(".zzzm_01_next").hide(); } else { $(".zzzm_01_prev").show(); $(".zzzm_01_next").show(); } } mySwiper7.onResize(); zzzm_01_t_on = i; } $(this).click(function () { if (zzzm_01_t_on != i) { $(this).addClass("on"); $(this).closest("ul").find("li").eq(zzzm_01_t_on).removeClass("on"); mySwiper7.removeAllSlides(); $(this).find(".zzzm_01_hid a").each(function () { mySwiper7.appendSlide('
' + $(this).html() + '
') }); if ($(this).find(".zzzm_01_hid a").length > 1) { mySwiper7.slideTo(1); } if (pagew > 900) { if ($(this).find(".zzzm_01_hid a").length < 3) { $(".zzzm_01_prev").hide(); $(".zzzm_01_next").hide(); } else { $(".zzzm_01_prev").show(); $(".zzzm_01_next").show(); } } mySwiper7.onResize(); zzzm_01_t_on = i; } }); }); } catch (e) { } try { mySwiper71 = new Swiper('.zzzm_01c_slide2', { slidesPerView: "3", speed: 4000,//切换速度 spaceBetween: 60, slidesPerView: 'auto', autoplay: {//自动播放 delay: 0,//自动切换的时间间隔 stopOnLastSlide: false,//切换到最后一个slide时停止自动切换 disableOnInteraction: false,//用户操作后是否停止 reverseDirection: true,//方向切换 }, freeMode: true, loop:true, }); } catch (e) { } try { mySwiper8 = new Swiper('.site_slide', { slidesPerView: 'auto', mousewheelControl: true, freeMode: true }); } catch (e) { } try { var qywh_02_t_on = 10000; $(".qywh_02_t p a").each(function (i,e) { if ($(this).attr("class") == "on") { qywh_02_t_on = i; } $(this).click(function () { if (qywh_02_t_on != i) { $(this).addClass("on"); $(".qywh_02c_" + i).show(); if (qywh_02_t_on != 10000) { $(".qywh_02c_" + qywh_02_t_on).hide(); $(".qywh_02_t p a").eq(qywh_02_t_on).removeClass("on"); } qywh_02_t_on = i; } }); }); } catch (e) { } try { mySwiper9 = new Swiper('.fzlc_06_slide', { slidesPerView: "4", speed: 1000, spaceBetween: 25, prevButton: '.fzlc_06_prev', nextButton: '.fzlc_06_next', }); } catch (e) { } try { mySwiper10 = new Swiper('.ab_01_slide', { slidesPerView: "1", speed: 1000, autoplay: 3000, loop:true, spaceBetween: 0, pagination: '.ab_01_sp', paginationClickable: true, prevButton: '.ab_01_prev', nextButton: '.ab_01_next', }); } catch (e) { } try { var msc_l_on = -1; $(".msc_l p").each(function (i, e) { if ($(this).attr("class") == "on") { msc_l_on = i; } $(this).click(function () { if (msc_l_on != i) { $(this).addClass("on"); $(this).closest(".msc_l").find("p").eq(msc_l_on).removeClass("on"); $(".mscr_" + i).show(); $(".mscr_" + msc_l_on).hide(); if ($(this).find("a").html() != "111111111111111") { $(".mscrimg_" + i).show(); } $(".mscrimg_" + msc_l_on).hide(); msc_l_on = i; } }); }); } catch (e) { } repage_com(); function repage_com() { pagew = $(document).outerWidth(true) + (window.innerWidth - document.body.clientWidth); pageh = $(window).innerHeight(); //document.title = pagew + " * " + pageh; try { $(".jtcy_02 ul li.li1").each(function () { if (pagew > 900) { if ($(this).find(".jtcy_02_img").height() > $(this).find(".jtcy_02_txt").height()) { $(this).find(".jtcy_02_txt").css({ "margin-top": ($(this).find(".jtcy_02_img").height() - $(this).find(".jtcy_02_txt").height()) / 2 + "px","opacity":"1" }); } } else { $(this).find(".jtcy_02_txt").css({ "margin-top": "20px","opacity":"1" }); } }); } catch (e) { } try { if ($(".qywh_01 .fr").height() > $(".qywh_01 .fl").height()) { $(".qywh_01 .fl").css({ "margin-top": ($(".qywh_01 .fr").height() - $(".qywh_01 .fl").height()) / 2 + "px","opacity":"1" }); } } catch (e) { } try { $(".qywh_02c_c").each(function () { if ($(this).find(".fl").height() > $(this).find(".qywh_02c_r").height()) { $(this).find(".qywh_02c_r").css({"height":$(this).find(".fl").height()+"px"}); } }); } catch (e) { } try { $(".rzdr_03 a").css({ "margin-top": ($(".rzdr_03 .img1").height() - $(".rzdr_03 a").height()) / 2 + "px" }); if (pagew > 900) { } else { $(".rzdr_03 .fl").css({ "height": $(".rzdr_03 .img1").height()+"px"}); } } catch (e) { } try { $(".cp_01 .wrap_c").each(function () { $(this).find(".cp_01_l").css({ "margin-top": "-"+$(this).find(".cp_01_l").height() / 2 + "px","opacity":"1"}); }); } catch (e) { } try { if (pagew > 900) { mySwiper1.params.slidesPerView = 3; } else { mySwiper1.params.slidesPerView =1; } mySwiper1.onResize(); } catch (e) { } try { if (pagew > 900) { mySwiper6.params.slidesPerView = 4; } else { mySwiper6.params.slidesPerView = 1; } mySwiper6.onResize(); } catch (e) { } try { if (pagew > 900) { mySwiper2.params.slidesPerView = 4; } else { mySwiper2.params.slidesPerView = 1; } mySwiper2.onResize(); } catch (e) { } try { if (pagew > 900) { mySwiper7.params.slidesPerView = 3; } else { mySwiper7.params.slidesPerView = 1; } mySwiper7.onResize(); } catch (e) { } try { $(".ab_04 ul li").each(function () { if (pagew > 900) { if ($(this).find(".ab_04_img").height() > $(this).find(".ab_04_txt_c").height()) { $(this).find(".ab_04_txt_c").css({ "margin-top": ($(this).find(".ab_04_img").height() - $(this).find(".ab_04_txt_c").height()) / 2 + "px" }); } } }); } catch (e) { } try { var jbxx_04_c_on = -1; $(".jbxx_04_c ul li").each(function () { $(this).css({"height":"auto"}); }); $(".jbxx_04_c ul li").each(function () { if (jbxx_04_c_on < $(this).height()) { jbxx_04_c_on = $(this).height(); } }); $(".jbxx_04_c ul li").each(function () { $(this).css({ "height": jbxx_04_c_on+"px" }); }); } catch (e) { } try { $(".cp_04_c ul li").each(function () { if ($(this).find("em.em1").height() < $(this).find("em.em2").height()) { $(this).find("em.em1").css({"margin-top":($(this).find("em.em2").height()-$(this).find("em.em1").height())/2+"px"}); } }); } catch (e) { } } });