$(function () { var mySwiper; var mySwiper1; var mySwiper2; var mySwiper3; var mySwiper4; var mySwiper5; var mySwiper6; var mySwiper7; 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(); }); try { var _topfs_v = $(document).scrollTop(); var previousScrollPos = 0; var scrollTimeout = null; $(window).scroll(function () { _topfs_v = $(document).scrollTop(); topfr_fun(_topfs_v); }) topfr_fun(_topfs_v); function topfr_fun(obj) { var currentScrollPos = $(this).scrollTop(); if (currentScrollPos > previousScrollPos) { $(".topfr").addClass("topDown"); } else if (currentScrollPos < previousScrollPos) { if (obj > 100) { $(".topfr").removeClass("topDown").addClass("on"); } else { $(".topfr").removeClass("topDown").removeClass("on"); } } previousScrollPos = currentScrollPos; var currentScrollPos = $(this).scrollTop(); $(".sharefr").removeClass("active"); if (scrollTimeout) { clearTimeout(scrollTimeout); } scrollTimeout = setTimeout(function () { if (obj > 100) { $(".sharefr").addClass("active"); } else { $(".sharefr").removeClass("active"); } }, 500); } } catch (e) { } try { mySwiper1 = new Swiper('.banner_slide', { slidesPerView: "1", speed: 1000, effect: 'fade', //loop: true, lazy: { loadPrevNext: true, loadPrevNextAmount:2, }, autoplay: { delay: 5800, disableOnInteraction: false, }, pagination: { el: '.bs_sp', clickable: true, }, on: { init: function (sw) { $(".banner_slide .swiper-slide").eq(0).find(".bs_c").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionStart: function (sw) { var num = sw.previousIndex; $(".banner_slide .swiper-slide").eq(num).find(".bs_c").stop(true, true).css({ "opacity": "0" }); var num = sw.activeIndex; $(".banner_slide .swiper-slide").eq(num).find(".bs_c").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionEnd: function (sw) { } } }); } catch (e) { } try { var my2_sb = $(".in_03_c .b1").innerWidth(); mySwiper2 = new Swiper('.in03c01_slide_01', { slidesPerView: "auto", speed: 6000, spaceBetween: my2_sb, loopAdditionalSlides: 10, autoplay: { delay: 1, }, loopFillGroupWithBlank: true, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, loop: true }); mySwiper3 = new Swiper('.in03c01_slide_02', { slidesPerView: "auto", speed: 6000, spaceBetween: my2_sb, loopAdditionalSlides: 10, autoplay: { delay: 1, }, loopFillGroupWithBlank: true, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, loop: true }); mySwiper4 = new Swiper('.in03c01_slide_03', { slidesPerView: "auto", speed: 6000, spaceBetween: my2_sb, loopAdditionalSlides: 10, autoplay: { delay: 1, }, loopFillGroupWithBlank: true, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, loop: true }); } catch (e) { } try { mySwiper5 = new Swiper('.btn01_slide', { slidesPerView: "auto", speed: 1000, autoplay: { delay: 3000, }, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.btn01_sp', clickable: true, }, }); } catch (e) { } try { mySwiper6 = new Swiper('.pli01_slide', { slidesPerView: "auto", centerInsufficientSlides:true, speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.btn01_sp', clickable: true, }, }); } catch (e) { } try { $(".pli03c_c ul li").each(function () { $(this).hover( function () { $(".pli03c_c ul li").removeClass("prevon"); $(this).prev().addClass("prevon"); }, function () { $(".pli03c_c ul li").removeClass("prevon"); } ); }); } catch (e) { } try { $(".p06_click").click(function () { if (!$(this).hasClass("active")) { $(this).addClass("active"); $(".pli_07").addClass("active"); } else { $(this).removeClass("active"); $(".pli_07").removeClass("active"); } }); } catch (e) { } try { mySwiper7 = new Swiper('.cxq01fl_slide', { slidesPerView:1, centerInsufficientSlides: true, speed: 1000, autoplay: { delay: 3000, }, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.cxq01fl_sp', clickable: true, }, }); } catch (e) { } try { mySwiper8 = new Swiper('.ns01c_slide', { slidesPerView: 1, centerInsufficientSlides: true, speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, scrollbar: { el: '.ns01c_sol', draggable: true, }, on: { init: function (sw) { $("1.ns01c_slide .swiper-slide").eq(0).find(".an").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionStart: function (sw) { var num = sw.previousIndex; $("1.ns01c_slide .swiper-slide").eq(num).find(".an").stop(true, true).css({ "opacity": "0" }); var num = sw.activeIndex; $("1.ns01c_slide .swiper-slide").eq(num).find(".an").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); }, slideChangeTransitionEnd: function (sw) { } } }); } catch (e) { } try { var my9_sp = $(".cpbj02_t .b1").width(); mySwiper9 = new Swiper('.cpbj02t_slide', { slidesPerView:"auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my9_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.cpbj02t_sp', clickable: true, }, }); } catch (e) { } try { var my10_sp = $(".scjd_05 .p2 .b1").width(); mySwiper10 = new Swiper('.scjd05_slide', { slidesPerView:"auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my10_sp, lazy: { loadPrevNext: true, loadPrevNextAmount:3 }, navigation: { prevEl: '.scjd05_prev', nextEl: '.scjd05_next', }, }); } catch (e) { } try { var my10_sp = $(".scjd_05 .p2 .b1").width(); mySwiper11 = new Swiper('.scjd06_slide', { slidesPerView: "auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my10_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.scjd06_sp', clickable: true, }, }); } catch (e) { } try { var my12_sp = $(".ls01_c .b1").width(); mySwiper12 = new Swiper('.ls01c_slide', { slidesPerView: "auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my12_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, navigation: { prevEl: '.ls01c_prev', nextEl: '.ls01c_next', }, }); } catch (e) { } try { var my13_sp = $(".pz02_b .b1").width(); mySwiper13 = new Swiper('.lz02b_slide', { slidesPerView: "auto", speed: 1000, spaceBetween: my13_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, }); } catch (e) { } try { var my14_sp = $(".job05_c .b1").width(); if (pagew > 768) { mySwiper14 = new Swiper('.job04cl_slide', { slidesPerView: "1", effect: 'fade', speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, }); } else { mySwiper14 = new Swiper('.job04cl_slide', { slidesPerView: "auto", speed: 1000, spaceBetween: my14_sp, lazy: { loadPrevNext: true, loadPrevNextAmount: 4, }, navigation: { prevEl: '.job04c_prev', nextEl: '.job04c_next', }, }); } var jb04_time; $(".jb04_sol ul li").each(function (i, e) { $(this).mouseenter(function () { var that = $(this); jb04_time = setTimeout(function () { if (!that.hasClass("active")) { $(".jb04_sol ul li").removeClass("active"); that.addClass("active"); mySwiper14.slideTo(i); } }, 250); }); $(this).mouseleave(function () { clearTimeout(jb04_time); }); }); } catch (e) { } try { var my15_sp = $(".job05_c .b1").width(); mySwiper15 = new Swiper('.job05c_slide', { slidesPerView: "auto", speed: 1000, spaceBetween: my15_sp, lazy: { loadPrevNext: true, loadPrevNextAmount:4, }, navigation: { prevEl: '.job05c_prev', nextEl: '.job05c_next', }, }); $(".job05_t ul li").each(function (i,e) { $(this).click(function () { if (!$(this).hasClass("active")) { $(".job05_t ul li").removeClass("active"); $(this).addClass("active"); $(".job05c_slide").css({ "opacity": "0" }); $(".job05c_more").css({ "opacity": "0" }); mySwiper15.removeAllSlides(); $(".job05_hid ul").eq(i).find("li").each(function () { mySwiper15.appendSlide('
' + $(this).html() + '
'); }); if ($(".job05_hid ul").eq(i).find("li").length > 3) { $(".job05c_more").css({ "opacity": "1" }); } mySwiper15.update(); mySwiper15.updateSize(); mySwiper15.lazy.load(); $(".job05c_slide").stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); } }); }); } catch (e) { } try { mySwiper16 = new Swiper('.fa03c_slide', { slidesPerView:1, speed: 1000, lazy: { loadPrevNext: true, loadPrevNextAmount: 4 }, pagination: { el: '.fa03t_sp', clickable: true, }, }); } catch (e) { } try { $(".btn_02 .btn02_r .p3 a").each(function (i, e) { $(this).click(function () { if (!$(this).hasClass("active")) { $(".btn_02 .btn02_r .p3 a").removeClass("active"); $(this).addClass("active"); $(".btn_02 .btn02_r .p2 img").stop(true, true).css({"opacity":"0"}); $(".btn_02 .btn02_r .p2 img").eq(i).stop(true, true).velocity("transition.slideUpIn", { stagger: 300 }); } }); }); } catch (e) { } try { layui.use('laydate', function () { var laydate = layui.laydate; laydate.render({ elem: '.sch_time1', format: 'yyyy', trigger: "click", type:"year", ready: function (data) { var showcurr = data.year + "年"; $(".layui-laydate .layui-laydate-footer").append("" + showcurr + ""); } }); laydate.render({ elem: '.sch_time2', format: 'yyyy', trigger: "click", type: "year", ready: function (data) { var showcurr = data.year + "年"; $(".layui-laydate .layui-laydate-footer").append("" + showcurr + ""); } }); }); } catch (e) { } try { mySwiper17 = new Swiper('.cxq02c_slide', { slidesPerView: "1", centerInsufficientSlides: true, speed: 1000, spaceBetween:20, lazy: { loadPrevNext: true, loadPrevNextAmount: 12 }, pagination: { el: '.cxq02c_sp', clickable: true, }, }); } catch (e) { } try { $(".cpbj01c_txt ul li").each(function (i,e) { $(this).click(function () { if (!$(this).hasClass("active")) { $(".cpbj01c_txt ul li").removeClass("active"); $(this).addClass("active"); $(".cpbj01c_img img.img0").css({"opacity":"0"}); $(".cpbj01c_img .c img").css({ "display": "none" }); $(".cpbj01c_img .c img").eq(i).stop(true, true).velocity("transition.expandIn", { duration:100,stagger: 300 }); } }); }); } catch (e) { } try { var my18_sb = $(".pz_03 .b1").innerWidth(); mySwiper18 = new Swiper('.pz03_slide', { slidesPerView: "auto", centerInsufficientSlides: true, speed: 1000, spaceBetween: my18_sb, lazy: { loadPrevNext: true, loadPrevNextAmount: 12 }, }); } catch (e) { } repage_com(); function repage_com() { pagew = $(document).outerWidth(true) + (window.innerWidth - document.body.clientWidth); pageh = $(window).innerHeight(); //document.title = pagew + " * " + pageh; try { var scjd05_w = $(".scjd05_slide .swiper-slide .i1").innerWidth(); var scjd05_h = $(".scjd05_slide .swiper-slide .i1").innerHeight(); $(".scjd05_more .scjd05_prev").css({ "top": (scjd05_h / 2 - $(".scjd05_more .scjd05_prev").innerHeight() / 2) + "px" }); $(".scjd05_more .scjd05_next").css({ "top": (scjd05_h / 2 - $(".scjd05_more .scjd05_prev").innerHeight() / 2) + "px" }); } catch (e) { } try { var ls01c_w = $(".ls01c_slide .swiper-slide .p1").innerWidth(); var ls01c_h = $(".ls01c_slide .swiper-slide .p1").innerHeight(); $(".ls01c_more .ls01c_prev").css({ "top": (ls01c_h / 2 - $(".ls01c_more .ls01c_prev").innerHeight() / 2) + "px" }); $(".ls01c_more .ls01c_next").css({ "top": (ls01c_h / 2 - $(".ls01c_more .ls01c_next").innerHeight() / 2) + "px" }); //$(".ls01c_more").css({ "left": ls01c_w + "px", "top": (ls01c_h / 2 - $(".ls01c_more").innerHeight() / 2) + "px" }); $(".ls01_c .b2").css({ "top": (ls01c_h / 2 - $(".ls01_c .b2").innerHeight() / 2 ) + "px" }); } catch (e) { } try { var job05c_w = $(".job05c_slide .swiper-slide .img").innerWidth(); var job05c_h = $(".job05c_slide .swiper-slide .img").innerHeight(); $(".job05c_more .job05c_prev").css({ "top": (job05c_h / 2 - $(".job05c_more .job05c_prev").innerHeight() / 2) + "px" }); $(".job05c_more .job05c_next").css({ "top": (job05c_h / 2 - $(".job05c_more .job05c_next").innerHeight() / 2) + "px" }); //$(".job05c_more").css({ "left": job05c_w + "px", "top": (job05c_h / 2 - $(".job05c_more").innerHeight() / 2) + "px" }); } catch (e) { } try { var job04c_w = $(".job04cl_slide .swiper-slide img").innerWidth(); var job04c_h = $(".job04cl_slide .swiper-slide img").innerHeight(); $(".job04c_more .job04c_prev").css({ "top": (job04c_h / 2 - $(".job04c_more .job04c_prev").innerHeight() / 2) + "px" }); $(".job04c_more .job04c_next").css({ "top": (job04c_h / 2 - $(".job04c_more .job04c_next").innerHeight() / 2) + "px" }); //$(".job04c_more").css({ "left": job04c_w + "px", "top": (job04c_h / 2 - $(".job04c_more").innerHeight() / 2) + "px" }); } catch (e) { } try { document.documentElement.style.setProperty("--pli_07_top", ($(".pli_07 ul li:eq(0)").innerHeight() - $(".pli_07 ul li:eq(0) .p1").innerHeight()) + "px"); } catch (e) { } } try { Pace.on("done", function () { try { var scjd05_w = $(".scjd05_slide .swiper-slide .i1").innerWidth(); var scjd05_h = $(".scjd05_slide .swiper-slide .i1").innerHeight(); $(".scjd05_more .scjd05_prev").css({ "top": (scjd05_h / 2 - $(".scjd05_more .scjd05_prev").innerHeight() / 2) + "px" }); $(".scjd05_more .scjd05_next").css({ "top": (scjd05_h / 2 - $(".scjd05_more .scjd05_prev").innerHeight() / 2) + "px" }); } catch (e) { } try { var ls01c_w = $(".ls01c_slide .swiper-slide .p1").innerWidth(); var ls01c_h = $(".ls01c_slide .swiper-slide .p1").innerHeight(); $(".ls01c_more .ls01c_prev").css({ "top": (ls01c_h / 2 - $(".ls01c_more .ls01c_prev").innerHeight() / 2) + "px" }); $(".ls01c_more .ls01c_next").css({ "top": (ls01c_h / 2 - $(".ls01c_more .ls01c_next").innerHeight() / 2) + "px" }); //$(".ls01c_more").css({ "left": ls01c_w + "px", "top": (ls01c_h / 2 - $(".ls01c_more").innerHeight() / 2) + "px" }); $(".ls01_c .b2").css({ "top": (ls01c_h / 2 - $(".ls01_c .b2").innerHeight() / 2) + "px" }); } catch (e) { } try { var job05c_w = $(".job05c_slide .swiper-slide .img").innerWidth(); var job05c_h = $(".job05c_slide .swiper-slide .img").innerHeight(); $(".job05c_more .job05c_prev").css({ "top": (job05c_h / 2 - $(".job05c_more .job05c_prev").innerHeight() / 2) + "px" }); $(".job05c_more .job05c_next").css({ "top": (job05c_h / 2 - $(".job05c_more .job05c_next").innerHeight() / 2) + "px" }); //$(".job05c_more").css({ "left": job05c_w + "px", "top": (job05c_h / 2 - $(".job05c_more").innerHeight() / 2) + "px" }); } catch (e) { } try { var job04c_w = $(".job04cl_slide .swiper-slide img").innerWidth(); var job04c_h = $(".job04cl_slide .swiper-slide img").innerHeight(); $(".job04c_more .job04c_prev").css({ "top": (job04c_h / 2 - $(".job04c_more .job04c_prev").innerHeight() / 2) + "px" }); $(".job04c_more .job04c_next").css({ "top": (job04c_h / 2 - $(".job04c_more .job04c_next").innerHeight() / 2) + "px" }); //$(".job04c_more").css({ "left": job04c_w + "px", "top": (job04c_h / 2 - $(".job04c_more").innerHeight() / 2) + "px" }); } catch (e) { } try { document.documentElement.style.setProperty("--pli_07_top", ($(".pli_07 ul li:eq(0)").innerHeight() - $(".pli_07 ul li:eq(0) .p1").innerHeight()) + "px"); } catch (e) { } }); } catch (e) { } function countup(_obj) { try { var settings = { 'time': 600, 'delay': 5 }; var $this = _obj; var $settings = settings; if (!$this.data('counterupTo')) { $this.data('counterupTo', $this.text()); } var time = parseInt($this.data("counter-time")) > 0 ? parseInt($this.data("counter-time")) : $settings.time; var delay = parseInt($this.data("counter-delay")) > 0 ? parseInt($this.data("counter-delay")) : $settings.delay; var divisions = time / delay; var num = $this.data('counterupTo'); var nums = [num]; var isComma = /[0-9]+,[0-9]+/.test(num); num = num.replace(/,/g, ''); var isInt = /^[0-9]+$/.test(num); var isFloat = /^[0-9]+\.[0-9]+$/.test(num); var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0; for (var i = divisions; i >= 1; i--) { var newNum = parseInt(Math.round(num / divisions * i)); if (isFloat) { newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces); } if (isComma) { while (/(\d+)(\d{3})/.test(newNum.toString())) { newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2'); } } nums.unshift(newNum); } $this.data('counterup-nums', nums); $this.text('0'); var f = function () { try { if ($this.data('counterup-nums') != "") { $this.text($this.data('counterup-nums').shift()); if ($(".zhaq_01_c").attr("class") == "zhaq_01_c") { if ($this.data('counterup-nums').shift() <= 20) { $(".zhaq_01_c").find(".img1").css({ "opacity": "1" }); $(".zhaq_01_c").find(".img2").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img3").css({ "opacity": "0" }); } else if ($this.data('counterup-nums').shift() <= 60) { $(".zhaq_01_c").find(".img1").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img2").css({ "opacity": "1" }); $(".zhaq_01_c").find(".img3").css({ "opacity": "0" }); } else if ($this.data('counterup-nums').shift() <= 100) { $(".zhaq_01_c").find(".img1").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img2").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img3").css({ "opacity": "1" }); } } } if ($this.data('counterup-nums').length) { setTimeout($this.data('counterup-func'), delay); } else { delete $this.data('counterup-nums'); $this.data('counterup-nums', null); $this.data('counterup-func', null); } } catch (e) { } }; $this.data('counterup-func', f); setTimeout($this.data('counterup-func'), delay); } catch (e) { } } });