/* * JS基础处理框架 * -- 提倡互联网共享,同时应尊重原创作者,网站制作属: 爱企云 -- * * @company: iqweb * @author: jack * timer: 2023年 * Tel:18565633435 * QQ:897232289 * WeChat:18565633435 */ var IqwXiongJs = { Width: $(window).width(), Height: $(window).height(), //锚点距离 maoNumber: 0, //数字滚动判断 NumberIf: true, FootNumberIf: true, Number: [], //有锚点才吸顶 maoTop: false, bannerAnimation: 'AddFadeInUp', EffectAnimate: 'fade', //滚动条 MyScroll: null, //加载 ImagesLoad: 0, SvgTimeOver: null, SvgTime: 0, ImgArray: [], allImages: [], //增加 IndexPageTab: null, IndexBannerPicTab: null, BannerTab: null, WapNavIF: true, IndexProductPhotoTab: null, IndexProductDetailsTab: null, IndexMapDetailsTab: null, IndexMapBtnTab: null, IndexCustomersPrevTab: null, IndexCustomersNextTab: null, AboutLayoutTab: null, AboutLayoutPaginationTab: null, InnovationPageTab: null, ProContentTab: null, ProBigTab: null, ProMaxTab: null, AdvertisingScroll: 0, AboutLayoutLength: 0, AboutLayoutPicTab: [], IndexProIf: true, IndexMapIf: true, AboutLayoutIf: true, ProPageIf: true, ProMouseTab: null, //EventKey: "ontouchstart" in document.documentElement ? "touchstart" : "click", Init: function () { var that = this; that.HtmlInit(); }, //事件 AddEventList: function () { var that = this; // console.log($(".introduce_head_back path").get(0).getTotalLength()); function return_false() { return false; } $('#top').on('click', function (e) { e.preventDefault(); that.ReturnTop(); }); $('.index_banner_pagination_item').on('click', function () { that.IndexPageTab.slideTo($(this).index() + 1); }); if (that.Width > 1200) { $('.about_culture_item_box').hover(function () { $('.about_culture_item_box').eq($(this).index()).addClass('about_culture_item_active').siblings().removeClass('about_culture_item_active'); }); } else { $('.about_culture_item_box').on('click', function () { $('.about_culture_item_box').eq($(this).index()).addClass('about_culture_item_active').siblings().removeClass('about_culture_item_active'); $('.about_wap_item_box').eq($(this).index()).addClass('about_wap_item_active').siblings().removeClass('about_wap_item_active'); }); } $('.pro_nav_wrap .pro_nav_item_box').on('click', function () { console.log($(this).index()); $('.pro_nav_wrap .pro_nav_item_box').eq($(this).index()).addClass('pro_nav_item_active').siblings().removeClass('pro_nav_item_active'); that.ProBigTab.slideTo($(this).index()); that.ProMouseTab.slideTo($(this).index()); }); $('.pro_show_wrap .pro_nav_item_box').on('click', function () { console.log($(this).index()); $('.pro_show_wrap .pro_nav_item_box').eq($(this).index()).addClass('pro_nav_item_active').siblings().removeClass('pro_nav_item_active'); that.ProBigTab.slideTo($(this).index()); that.ProMouseTab.slideTo($(this).index()); }); $('.pro_head_pagination_item').on('click', function () { that.ProHeadTab.slideTo($(this).index() + 1); }); $('.pro_details_pagination_item').on('click', function () { that.ProDetailsTab.slideTo($(this).index()); }); $('.video_item_photo').on('click', function (e) { e.preventDefault(); $('.video_popup_wrap').addClass('video_popup_show'); console.log($(this).attr('data-url')); $('.video_popup_content video').attr('src', $(this).attr('data-url')).trigger('play'); }); $('.video_popup_btn').on('click', function (e) { e.preventDefault(); $('.video_popup_wrap').removeClass('video_popup_show'); $('.video_popup_content video').trigger('pause'); }); setTimeout(function () { $('.BMap_Marker').append('
' + '
' + '
' + '
' + '
' + '
'); }, 100); // if ($('.public_banner_wrap').length > 0 && that.Width>1200) { // setTimeout(function () { // var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; // $(document.body).animate({ // scrollTop: $('.public_banner_wrap').height() - $('.header_after').height() // }, 700); // $('html').animate({ // scrollTop: $('.public_banner_wrap').height() - $('.header_after').height() // }, 700); // }, 2000) // } }, IndexBannerSwiper: function () { var that = this; var TouchMove = false; if (that.Width < 1200) { TouchMove = true; } setTimeout(function () { that.IndexPageTab = new Swiper(".index_banner_box", { effect: 'fade', initialSlide: 0, //切换时间 speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, loop: true, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, on: { slideChangeTransitionStart: function () { that.IndexBannerPicTab.slideTo(this.realIndex); $('.index_banner_pagination_item').eq(this.realIndex).addClass('index_banner_pagination_active').siblings().removeClass('index_banner_pagination_active'); } } }); }, 500) }, IndexBannerPicSwiper: function () { var that = this; var TouchMove = false; setTimeout(function () { that.IndexBannerPicTab = new Swiper(".index_banner_pic", { effect: 'fade', initialSlide: 0, //切换时间 speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, // loop: true, }); }, 500) }, IndexProductDetailsSwiper: function () { var that = this; var TouchMove = false; that.IndexProductDetailsTab = new Swiper(".index_product_details_swiper", { effect: 'fade', initialSlide: 0, //切换时间 speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, loop: true, }); }, IndexProductPhotoSwiper: function () { var that = this; var TouchMove = false; that.IndexProductPhotoTab = new Swiper(".index_product_photo_swiper", { initialSlide: 0, //切换时间 speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, loop: true, loopedSlides: $('.index_product_photo_swiper .swiper-slide').length, on: { init: function () { if (this.loopedSlides >= 10) { $('.index_product_photo_default').html(this.loopedSlides); } else { $('.index_product_photo_default').html('0' + this.loopedSlides); } for (var i = 0; i < this.loopedSlides; i++) { $('.index_product_pagination_box').append('
'); } $('.index_product_pagination_item').eq(0).addClass('index_product_pagination_active'); $('.index_product_pagination_item').on('click', function () { that.IndexProductPhotoTab.slideTo($(this).index()); }); }, slideChangeTransitionStart: function () { that.IndexProductDetailsTab.slideTo(this.realIndex); $('.index_product_pagination_item').removeClass('index_product_pagination_active').eq(this.realIndex).addClass('index_product_pagination_active'); if (parseInt(this.realIndex + 1) >= 10) { $('.index_product_photo_current').html(parseInt(this.realIndex + 1)); } else { $('.index_product_photo_current').html('0' + parseInt(this.realIndex + 1)); } } } }); }, IndexMapDetailsSwiper: function () { var that = this; var TouchMove = false; that.IndexMapDetailsTab = new Swiper(".index_map_details_swiper", { effect: 'fade', initialSlide: 0, //切换时间 speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, loop: true, }); }, IndexMapBtnSwiper: function () { var that = this; var aSpaceBetween = 0; var aDirection = 'vertical'; var aAllowTouchMove = false; var aSlidesPerView = 5; if (that.Width < 1200) { aDirection = 'horizontal'; aAllowTouchMove = true; aSlidesPerView = 3; aSpaceBetween = that.Width * 0.03623188; } that.IndexMapBtnTab = new Swiper(".index_map_swiper", { direction: aDirection, // initialSlide: 0, //切换时间 speed: 800, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 centeredSlides: true, slideToClickedSlide: true, followFinger: false, //禁止手指滑动 allowTouchMove: aAllowTouchMove, loop: true, loopedSlides: $('.index_map_swiper .swiper-slide').length, on: { slideChangeTransitionStart: function () { that.IndexMapDetailsTab.slideTo(this.realIndex + 1); } } }); }, IndexCustomersPrevSwiper: function () { var that = this; var aSlidesPerView = 6; var aSpaceBetween = that.Width * 0.030208333; var TouchMove = false; if (that.Width < 1200) { aSlidesPerView = 2.5; aSpaceBetween = that.Width * 0.048309; } if ($('.index_customers_prev_swiper').length > 0) { that.IndexCustomersPrevTab = new Swiper(".index_customers_prev_swiper", { centeredSlides: true, loop: true, //切换时间 slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, speed: 7000,//匀速时间 //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, autoplay: { delay: 0, stopOnLastSlide: false, disableOnInteraction: false, // pauseOnMouseEnter: true, }, }); } }, IndexCustomersNextSwiper: function () { var that = this; var aSlidesPerView = 6; var aSpaceBetween = that.Width * 0.030208333; var TouchMove = false; if (that.Width < 1200) { aSlidesPerView = 2.5; aSpaceBetween = that.Width * 0.048309; } if ($('.index_customers_next_swiper').length > 0) { that.IndexCustomersNextTab = new Swiper(".index_customers_next_swiper", { centeredSlides: true, loop: true, //切换时间 slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, speed: 7000,//匀速时间 autoplay: { delay: 0, stopOnLastSlide: false, disableOnInteraction: false, reverseDirection: true, // pauseOnMouseEnter: true, }, }); } }, IndexNewsSwiper: function () { var that = this; var aSlidesPerView = 3; var aSpaceBetween = that.Width * 0.026041666; var TouchMove = false; if ($('.index_news_swiper').length > 0 && that.Width > 1200) { that.IndexNewsTab = new Swiper(".index_news_swiper", { speed: 800, loop: true, //切换时间 slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, navigation: { nextEl: ".index_news_pagination_next", prevEl: ".index_news_pagination_prev", }, }); } }, AboutLayoutSwiper: function () { var that = this; var TouchMove = false; if ($('.about_layout_tab').length > 0) { that.AboutLayoutTab = new Swiper(".about_layout_tab", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.about_layout_tab .layout_tab_slide').length, on: { init: function () { that.AboutLayoutLength = this.loopedSlides; } } }); } }, AboutLayoutPicSwiper: function () { var that = this; var TouchMove = false; // console.log(that.AboutLayoutLength); for (var i = 0; i < that.AboutLayoutLength; i++) { that.AboutLayoutPicTab.push( 'AboutPicTab' + (i + 1) ) // console.log(that.AboutLayoutPicTab); console.log(i + 1); that.AboutLayoutPicTab[i] = new Swiper(".about_layout_pic" + (i + 1), { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, pagination: { el: ".about_layout_pic" + (i + 1) + " .about_layout_pagination_pic", clickable: true, }, }); } }, AboutLayoutContentSwiper: function () { var that = this; var TouchMove = false; if ($('.about_layout_swiper').length > 0) { that.AboutLayoutContentTab = new Swiper(".about_layout_swiper", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, on: { slideChangeTransitionStart: function () { that.AboutLayoutTab.slideTo(this.realIndex); } } }); } }, AboutLayoutPaginationSwiper: function () { var that = this; var aSpaceBetween = that.Width * 0.023958333; var aSlidesPerView = 3; that.AboutLayoutPaginationTab = new Swiper(".about_layout_pagination_swiper", { direction: 'vertical', // initialSlide: 0, //切换时间 speed: 800, slidesPerView: aSlidesPerView, // spaceBetween : aSpaceBetween, //禁止滑动时swiper移动 centeredSlides: true, slideToClickedSlide: true, followFinger: false, //禁止手指滑动 allowTouchMove: false, loop: true, // loopedSlides: $('.index_map_swiper .swiper-slide').length, on: { slideChangeTransitionStart: function () { that.AboutLayoutContentTab.slideTo(this.realIndex + 1); } } }); }, InnovationPageSwiper: function () { var that = this; var aSpaceBetween = that.Width * 0.0208333; var aSlidesPerView = 3.4; if (that.Width < 1200) { aSlidesPerView = 1.4; } that.InnovationPageTab = new Swiper(".innovation_page_swiper", { //切换时间 speed: 800, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 // allowTouchMove: false, // loop: true, mousewheel: true, pagination: { el: ".innovation_pagination_box", type: "progressbar", }, }); }, DutyListSwiper: function () { var that = this; var aSpaceBetween = that.Width * 0.01875; var aSlidesPerView = 5; if (that.Width < 1200) { aSlidesPerView = 2.5; } that.DutyListTab = new Swiper(".duty_list_swiper", { //切换时间 speed: 800, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: false, // loop: true, }); }, ProContentSwiper0: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper0').length > 0) { that.ProContentTab0 = new Swiper(".pro_content_swiper0", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper0: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView = 1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper0').length > 0) { that.ProMaxTab0 = new Swiper(".pro_max_swiper0", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, centeredSlides:aCenteredSlides, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper0 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box0 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box0 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box0 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab0.slideTo(this.realIndex + 1); } } }); } }, ProContentSwiper1: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper1').length > 0) { that.ProContentTab1 = new Swiper(".pro_content_swiper1", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper1: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView = 1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper1').length > 0) { that.ProMaxTab1 = new Swiper(".pro_max_swiper1", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, centeredSlides:aCenteredSlides, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper1 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box1 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box1 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box1 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab1.slideTo(this.realIndex + 1); } } }); } }, ProContentSwiper2: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper2').length > 0) { that.ProContentTab2 = new Swiper(".pro_content_swiper2", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper2: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView = 1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper2').length > 0) { that.ProMaxTab2 = new Swiper(".pro_max_swiper2", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, centeredSlides:aCenteredSlides, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper2 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box2 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box2 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box2 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab2.slideTo(this.realIndex + 1); } } }); } }, ProContentSwiper3: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper3').length > 0) { that.ProContentTab3 = new Swiper(".pro_content_swiper3", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper3: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView = 1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper3').length > 0) { that.ProMaxTab3 = new Swiper(".pro_max_swiper3", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, centeredSlides:aCenteredSlides, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper3 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box3 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box3 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box3 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab3.slideTo(this.realIndex + 1); } } }); } }, ProContentSwiper4: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper4').length > 0) { that.ProContentTab4 = new Swiper(".pro_content_swiper4", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper4: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView = 1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper4').length > 0) { that.ProMaxTab4 = new Swiper(".pro_max_swiper4", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, centeredSlides:aCenteredSlides, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper4 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box4 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box4 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box4 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab4.slideTo(this.realIndex + 1); } } }); } }, ProContentSwiper5: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper5').length > 0) { that.ProContentTab5 = new Swiper(".pro_content_swiper5", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper5: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView = 1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper5').length > 0) { that.ProMaxTab5 = new Swiper(".pro_max_swiper5", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, centeredSlides:aCenteredSlides, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper5 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box5 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box5 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box5 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab5.slideTo(this.realIndex + 1); } } }); } }, ProContentSwiper6: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper6').length > 0) { that.ProContentTab6 = new Swiper(".pro_content_swiper6", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper6: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView =1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper6').length > 0) { that.ProMaxTab6 = new Swiper(".pro_max_swiper6", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, centeredSlides:aCenteredSlides, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper6 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box6 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box6 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box6 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab6.slideTo(this.realIndex + 1); } } }); } }, ProContentSwiper7: function () { var that = this; var TouchMove = false; if ($('.pro_content_swiper7').length > 0) { that.ProContentTab7 = new Swiper(".pro_content_swiper7", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, }); } }, ProMaxSwiper7: function () { var that = this; var TouchMove = false; var aSpaceBetween = 0; var aSlidesPerView = 1; var aDirection = "vertical"; var aCenteredSlides = false; if (that.Width < 1200) { aDirection = 'horizontal'; aSlidesPerView = 1.5; aSpaceBetween = that.Width * 0.048309; aCenteredSlides = true; TouchMove = true; } if ($('.pro_max_swiper7').length > 0) { that.ProMaxTab7 = new Swiper(".pro_max_swiper7", { direction: aDirection, speed: 800, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, centeredSlides:aCenteredSlides, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, loopedSlides: $('.pro_max_swiper7 .swiper-slide').length, on: { init: function () { $('.pro_max_pagination_box7 .pro_max_pagination_current').html('01'); $('.pro_max_pagination_box7 .pro_max_pagination_default').html('0' + this.loopedSlides); }, slideChangeTransitionStart: function () { $('.pro_max_pagination_box7 .pro_max_pagination_current').html('0' + (this.realIndex + 1)); that.ProContentTab7.slideTo(this.realIndex + 1); } } }); } }, ProSlideSwiper0: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper0').length > 0) { that.ProSlideTab0 = new Swiper(".pro_slide_swiper0", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab0.slideTo(this.realIndex); that.ProMaxTab0.slideTo(this.realIndex); } } }); } }, ProSlideSwiper1: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper1').length > 0) { that.ProSlideTab1 = new Swiper(".pro_slide_swiper1", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab1.slideTo(this.realIndex); that.ProMaxTab1.slideTo(this.realIndex); } } }); } }, ProSlideSwiper2: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper2').length > 0) { that.ProSlideTab1 = new Swiper(".pro_slide_swiper2", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab2.slideTo(this.realIndex); that.ProMaxTab2.slideTo(this.realIndex); } } }); } }, ProSlideSwiper3: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper3').length > 0) { that.ProSlideTab3 = new Swiper(".pro_slide_swiper3", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab3.slideTo(this.realIndex); that.ProMaxTab3.slideTo(this.realIndex); } } }); } }, ProSlideSwiper4: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper4').length > 0) { that.ProSlideTab4 = new Swiper(".pro_slide_swiper4", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab4.slideTo(this.realIndex); that.ProMaxTab4.slideTo(this.realIndex); } } }); } }, ProSlideSwiper5: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper5').length > 0) { that.ProSlideTab5 = new Swiper(".pro_slide_swiper5", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab5.slideTo(this.realIndex); that.ProMaxTab5.slideTo(this.realIndex); } } }); } }, ProSlideSwiper6: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper6').length > 0) { that.ProSlideTab6 = new Swiper(".pro_slide_swiper6", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab6.slideTo(this.realIndex); that.ProMaxTab6.slideTo(this.realIndex); } } }); } }, ProSlideSwiper7: function () { var that = this; var TouchMove = false; var aDirection = "vertical"; var aMousewheel = true; if(that.Width<1200){ aDirection = 'horizontal'; aMousewheel = false; } if ($('.pro_slide_swiper7').length > 0) { that.ProSlideTab7 = new Swiper(".pro_slide_swiper7", { direction: aDirection, speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, grabCursor: true, //禁止手指滑动 allowTouchMove: TouchMove, mousewheel: aMousewheel, on: { slideChangeTransitionStart: function () { that.ProContentTab7.slideTo(this.realIndex); that.ProMaxTab7.slideTo(this.realIndex); } } }); } }, ProBigSwiper: function () { var that = this; var TouchMove = false; if ($('.pro_big_swiper').length > 0) { that.ProBigTab = new Swiper(".pro_big_swiper", { effect: 'fade', speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, on:{ init:function (){ this.slideTo($('.pro_nav_item_active').index()); } } }); } }, ProMouseSwiper: function () { var that = this; var TouchMove = false; if ($('.pro_mouse_swiper').length > 0) { that.ProMouseTab = new Swiper(".pro_mouse_swiper", { effect: 'fade', speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, on:{ init:function (){ this.slideTo($('.pro_nav_item_active').index()); } } }); } }, ProHeadSwiper: function () { var that = this; var TouchMove = false; if ($('.pro_head_swiper').length > 0) { that.ProHeadTab = new Swiper(".pro_head_swiper", { effect: 'fade', speed: 800, loop: true, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, on: { slideChangeTransitionStart: function () { $('.pro_head_pagination_item').eq(this.realIndex).addClass('pro_head_pagination_active').siblings().removeClass('pro_head_pagination_active'); } } }); } }, ProDetailsSwiper: function () { var that = this; var TouchMove = false; if ($('.pro_details_swiper').length > 0) { that.ProDetailsTab = new Swiper(".pro_details_swiper", { autoHeight: true, effect: 'fade', speed: 800, //禁止滑动时swiper移动 followFinger: false, //禁止手指滑动 allowTouchMove: TouchMove, on: { slideChangeTransitionStart: function () { $('.pro_details_pagination_item').eq(this.realIndex).addClass('pro_details_pagination_active').siblings().removeClass('pro_details_pagination_active'); } } }); } }, MouseWheel: function () { var that = this; if (that.Width > 1200) { $('body').on('mousewheel', function (event) { if (event.deltaY < 0) { // console.log('正向下滚动'); $('.header_wrap').addClass('header_hide'); } else { // console.log('正向上滚动'); $('.header_wrap').removeClass('header_hide'); } }); } }, indexNumber: function () { var that = this; if (that.NumberIf) { console.log('数字滚动'); var numberL = $('.index_number'); $('.index_number').each(function () { $(this).prop('counter', 0).animate({ counter: $(this).text() }, { duration: 1500, easing: 'swing', step: function (now) { now = Math.ceil(now); now = now.toString(); now = now.replace(/\B(?=(\d{3})+(?!\d))/g, ''); $(this).text(now); } }); }); that.NumberIf = false; } }, //底部 footAnimate: function () { var that = this; var FootWrap = $('.inner_page_wrap'); var FootContent = $('.foot_content_box'); if (that.Width > 1200) { FootWrap.css({ height: FootContent.height() + 'px' }); var scrollTop = $(window).scrollTop(); if (FootContent.length > 0) { var footerHeight = FootWrap.offset().top - scrollTop - that.Height; if (footerHeight <= 0) { FootContent.css({ WebkitTransform: 'translateY(' + parseInt(Math.abs(footerHeight / 2)) + 'px)', transform: 'translateY(' + parseInt(Math.abs(footerHeight / 2)) + 'px)', }); } } $(window).scroll(function () { var scrollTop = $(window).scrollTop(); if (FootContent.length > 0) { var footerHeight = FootWrap.offset().top - scrollTop - that.Height; if (footerHeight <= 0) { FootContent.css({ WebkitTransform: 'translate3d(0,' + parseInt(Math.abs(footerHeight / 2)) + 'px,0)', transform: 'translate3d(0,' + parseInt(Math.abs(footerHeight / 2)) + 'px,0)' }); } } }); } }, //导航高亮 navHover: function () { $('.public_nav_item').hover(function () { $('.public_nav_item').addClass('public_nav_default'); $('.public_nav_item').eq($(this).index()).addClass('public_nav_hover'); }, function () { $('.public_nav_item').removeClass('public_nav_default public_nav_hover'); }); }, //滚动条 Scrollbar: function () { setInterval(function () { $('body').getNiceScroll().resize(); }, 300); var that = this; if (that.Width > 1200) { $(document).ready(function () { $("body").niceScroll({ zindex: "99999", //滚动条颜色 cursorcolor: "rgba(0,0,0,0)", // 当滚动条是隐藏状态时改变透明度,值范围1到0 cursoropacitymin: 0, // 当滚动条是显示状态时改变透明度,值范围1到0 cursoropacitymax: 1, //使光标拖动滚动像在台式电脑触摸设备 true滚动条拖动不可用 touchbehavior: false, // 隐藏滚动条的方式,可用的值:true|无滚动时隐藏,"cursor"|隐藏,false|不隐藏,"leave"|仅在指针离开内容时隐藏,"hidden"|一直隐藏,"scroll"|仅在滚动时显示 autohidemode: true, //启用滚动跳跃的内容移动 bouncescroll: true, //可以使用 CSS 变型来滚动内容 enabletranslate3d: true, // niceScroll 可以管理水平滚动 horizrailenabled: true, //背景滚动槽颜色 background: "rgba(211,211,211,0)", //滚动条宽度 cursorwidth: "5px", //滚动条两头的圆角 cursorborderradius: "0", //滚动条的位置 railpadding: { top: 0, right: 0, left: 0, bottom: 0 }, //可以管理鼠标滚轮事件 enablemousewheel: true, //可以管理键盘事件 enablekeyboard: true, //滚动速度 scrollspeed: 120, smoothscroll: 'ease', hidecursordelay: 400, // 鼠标滚动的滚动速度(像素) mousescrollstep: 9 * 6, //仅 boxzoom=true 和触屏设备时有效)激活变焦当 out/in (两个手指外账或收缩) gesturezoom: false, //你可以用鼠标滚动可滚动区域的滚动条和增加鼠标滚轮事件 preservenativescrolling: true, //当按下空格时使页面向下滚动 spacebarenabled: true, //防止多触点时间引发滚动 preventmultitouchscrolling: true, }); }); that.NavScroll(); } else { $('body').addClass('body_hide'); that.NavScroll(); } }, //获取TOP NavScroll: function () { var that = this; that.scrollTop = document.documentElement.scrollTop || document.body.scrollTop; that.NavScrollTop(); // console.log("滚动距离" + that.scrollTop); window.onscroll = function () { that.scrollTop = document.documentElement.scrollTop || document.body.scrollTop; that.NavScrollTop(); // console.log("滚动距离" + that.scrollTop); }; }, //判断top值 NavScrollTop: function () { var that = this; that.scrollTop = $(window).scrollTop(); that.scrollTop = document.documentElement.scrollTop || document.body.scrollTop; //移动端澳门新葡萄新京8883导航 if (that.scrollTop > 100) { $('.header_wrap').addClass('header_active'); } else { $('.header_wrap').removeClass('header_active'); } if ($('.about_advertising_scroll').length > 0 && that.Width > 1200) { //间距 var AboutWidth = that.Width * 0.0963541666; if (that.scrollTop > $('.about_advertising_scroll').offset().top - (that.Height * 1.4)) { //位移=阈值/1.5 that.AdvertisingScroll = parseInt((that.scrollTop + (that.Height * 1.4)) - $('.about_advertising_scroll').offset().top); $('.about_advertising_box').css({ padding: '0 ' + (AboutWidth - (that.AdvertisingScroll / 2)) + 'px' }); //超出等于0 if ((AboutWidth - (that.AdvertisingScroll / 2)) <= 0) { $('.about_advertising_box').css({ padding: '0' }); } } else { //默认 $('.about_advertising_box').css({ padding: '0 ' + (AboutWidth) + 'px' }); } } that.FadeInUp(); that.IndexAboutWrap(); that.IndexAboutPhoto(); that.IndexProductBox(); that.IndexMapTab(); that.IndexCustomersWrap(); that.IndexNewsBox(); that.AboutDetailHead(); that.AboutDetailContent(); that.AboutLayoutHead(); that.AboutLayoutBox(); that.AboutCultureWrap(); that.InnovationPageBig(); that.PartnerPageHead(); that.PartnerPageItemBox(); // that.ArchitecturePageBjq(); that.DutyPageHead(); that.DutyDetailPhoto(); that.duty_detail_bjq(); that.DutyDetailTipsBox(); that.DutyItemBox(); that.NewsPageItemBox(); that.VideoItemBox(); that.JoinDetailsHeadBox(); that.JoinDetailsFootBox(); that.ContactPageMapWrap(); that.ContactPageContent(); that.NewsBannerContent(); that.NewsDetailsBjq(); that.ProPageWrap(); that.ProHeadBox(); that.DetailsIntroductionBox(); that.DetailsSeriesBox(); that.DetailsPageBox(); }, //进场 FadeInUp: function () { var that = this; var Item = $('.FadeInUp'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddFadeInUp'); } } } }, IndexAboutWrap: function () { var that = this; var Item = $('.index_about_wrap'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.6; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddIndexAboutWrap'); setTimeout(function () { that.indexNumber(); }, 700) } } } }, IndexAboutPhoto: function () { var that = this; var Item = $('.index_about_photo'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.6; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddIndexAboutPhoto'); } } } }, IndexProductBox: function () { var that = this; var Item = $('.index_product_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.8; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddIndexProductBox'); if (that.IndexProIf) { console.log('产品加载') that.IndexProIf = false; setTimeout(function () { that.IndexProductDetailsSwiper(); that.IndexProductPhotoSwiper(); }, 300) } } } } }, IndexMapTab: function () { var that = this; var Item = $('.index_map_wrap'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.8; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddIndexMapTab'); if (that.IndexMapIf) { console.log('地图加载') that.IndexMapIf = false; setTimeout(function () { that.IndexMapDetailsSwiper(); that.IndexMapBtnSwiper(); }, 300) } } } } }, IndexCustomersWrap: function () { var that = this; var Item = $('.index_customers_wrap'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.6; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddIndexCustomersWrap'); } } } }, IndexNewsBox: function () { var that = this; var Item = $('.index_news_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.8; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddIndexNewsBox'); } } } }, AboutDetailHead: function () { var that = this; var Item = $('.about_detail_head'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.8; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddAboutDetailHead'); } } } }, AboutDetailContent: function () { var that = this; var Item = $('.about_detail_content'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.8; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddAboutDetailContent'); } } } }, AboutLayoutHead: function () { var that = this; var Item = $('.about_layout_head'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.8; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddAboutLayoutHead'); } } } }, AboutLayoutBox: function () { var that = this; var Item = $('.about_layout_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.6; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddAboutLayoutBox'); if (that.AboutLayoutIf) { console.log('产能布局加载') that.AboutLayoutIf = false; that.AboutLayoutContentSwiper(); that.AboutLayoutPicSwiper(); that.AboutLayoutPaginationSwiper(); } } } } }, AboutCultureWrap: function () { var that = this; var Item = $('.about_culture_wrap'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddAboutCultureWrap'); } } } }, InnovationPageBig: function () { var that = this; var Item = $('.innovation_page_big'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddInnovationPageBig'); } } } }, PartnerPageHead: function () { var that = this; var Item = $('.partner_page_head'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddPartnerPageHead'); } } } }, PartnerPageItemBox: function () { var that = this; var Item = $('.partner_page_item_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddPartnerPageItemBox'); } } } }, ArchitecturePageBjq: function () { var that = this; var Item = $('.architecture_page_bjq p,.architecture_page_bjq img,.architecture_page_bjq h1,.architecture_page_bjq h2,.architecture_page_bjq h3,.architecture_page_bjq h4'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('ArchitecturePageShow'); } } } }, DutyPageHead: function () { var that = this; var Item = $('.duty_page_head'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDutyPageHead'); } } } }, DutyDetailPhoto: function () { var that = this; var Item = $('.duty_detail_photo'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.6; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDutyDetailPhoto'); } } } }, duty_detail_bjq: function () { var that = this; var Item = $('.duty_detail_bjq p,.duty_detail_bjq img,.duty_detail_bjq h1,.duty_detail_bjq h2,.duty_detail_bjq h3,.duty_detail_bjq h4'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDutyDetailBjqShow'); } } } }, DutyDetailTipsBox: function () { var that = this; var Item = $('.duty_detail_tips_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDutyDetailTipsBox'); } } } }, DutyItemBox: function () { var that = this; var Item = $('.duty_item_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDutyItemBox'); } } } }, NewsPageItemBox: function () { var that = this; var Item = $('.news_page_item_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddNewsPageItemBox'); } } } }, VideoItemBox: function () { var that = this; var Item = $('.video_item_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddVideoItemBox'); } } } }, JoinDetailsHeadBox: function () { var that = this; var Item = $('.join_details_head_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddJoinDetailsHeadBox'); } } } }, JoinDetailsFootBox: function () { var that = this; var Item = $('.join_details_foot_box p,.join_details_foot_box img,.join_details_foot_box h1,.join_details_foot_box h2,.join_details_foot_box h3,.join_details_foot_box h4'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddJoinDetailsFootShow'); } } } }, ContactPageMapWrap: function () { var that = this; var Item = $('.contact_page_map_wrap'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddContactPageMapWrap'); } } } }, ContactPageContent: function () { var that = this; var Item = $('.contact_page_content'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddContactPageContent'); } } } }, NewsBannerContent: function () { var that = this; var Item = $('.news_banner_content'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddNewsBannerContent'); } } } }, NewsDetailsBjq: function () { var that = this; var Item = $('.news_details_bjq p,.news_details_bjq img,.news_details_bjq h1,.news_details_bjq h2,.news_details_bjq h3,.news_details_bjq h4'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddNewsDetailsBjq'); } } } }, ProPageWrap: function () { var that = this; var Item = $('.pro_page_wrap'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddProPageWrap'); if (that.ProPageIf) { console.log('产品列表加载'); setTimeout(function () { that.ProPageIf = false; that.ProContentSwiper0(); that.ProMaxSwiper0(); that.ProContentSwiper1(); that.ProMaxSwiper1(); that.ProContentSwiper2(); that.ProMaxSwiper2(); that.ProContentSwiper3(); that.ProMaxSwiper3(); that.ProContentSwiper4(); that.ProMaxSwiper4(); that.ProContentSwiper5(); that.ProMaxSwiper5(); that.ProContentSwiper6(); that.ProMaxSwiper6(); that.ProContentSwiper7(); that.ProMaxSwiper7(); that.ProSlideSwiper0(); that.ProSlideSwiper1(); that.ProSlideSwiper2(); that.ProSlideSwiper3(); that.ProSlideSwiper4(); that.ProSlideSwiper5(); that.ProSlideSwiper6(); that.ProSlideSwiper7(); }, 300); } } } } }, ProHeadBox: function () { var that = this; var Item = $('.pro_head_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddProHeadBox'); } } } }, DetailsIntroductionBox: function () { var that = this; var Item = $('.details_introduction_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDetailsIntroductionBox'); } } } }, DetailsSeriesBox: function () { var that = this; var Item = $('.details_series_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDetailsSeriesBox'); } } } }, DetailsPageBox: function () { var that = this; var Item = $('.details_page_box'); if (Item.length > 0) { for (var i = 0; i < Item.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > Item.eq(i).offset().top) { Item.eq(i).addClass('AddDetailsPageBox'); } } } }, //返回顶部 ReturnTop: function () { var that = this; var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; $(document.body).animate({ scrollTop: 0 }, 700); $('html').animate({ scrollTop: 0 }, 700); }, //移动端导航 WapNav: function () { var that = this; var top = 0;//给top变量一个初始值,以便下方赋值并引用。 $('.header_menu_ul').on('click', function (e) { e.preventDefault(); if (that.WapNavIF) { $('.header_wrap').addClass('header_wap_active'); that.WapNavIF = false; top = $(window).scrollTop(); $('body').css("top", -top + "px"); $('body').addClass('body_flex'); } else { $('.header_wrap').removeClass('header_wap_active'); that.WapNavIF = true; $('body').removeClass('body_flex'); $(window).scrollTop(top); } }); }, //锚点特效 maoAnimate: function () { var that = this; var _hash = window.location.hash; if (that.Width > 1200) { that.maoNumber = $('.header_after').height() * 2; if ($('.public_banner_wrap').get(0)) { that.maoNumber = $('.header_after').height(); } } else { that.maoNumber = $('.header_after').height(); } //锚点滑动 $('.anchor_link').click(function () { $('html,body').animate({scrollTop: $(this.hash).offset().top - that.maoNumber}, 300); }); setTimeout(function () { if (_hash && $(_hash).get(0)) { $('html,body').animate({scrollTop: $(_hash).offset().top - that.maoNumber}, 300); } }, 50); }, //Loading Loading: function () { var that = this; for (var i = 0; i < $('.loading_img').length; i++) { if ($('.loading_img').eq(i).attr('src') == "") { console.log('少图'); } else { that.ImgArray.push( $('.loading_img').eq(i).attr('src') ); } } //去重Img function unique2(array) { array.sort(); var re = [array[0]]; for (var i = 1; i < array.length; i++) { if (array[i] !== re[re.length - 1]) { re.push(array[i]); } } return re; } that.allImages = unique2(that.ImgArray); // console.log(that.ImgArray.length); if ($('.loading_wrap').length > 0 && that.ImgArray.length > 0) { function handleComplete() { console.log('加载成功'); // $('.loading_wrap').addClass('loading_remove'); // //加载完成启动网站 // setTimeout(function () { // that.HtmlInit(); // $('.loading_wrap').remove(); // }, 1400); } var queue = new createjs.LoadQueue(); queue.installPlugin(createjs.Sound); queue.loadManifest(that.allImages); queue.on("fileload", function (e) { // $('.loading_schedule_box').stop().show(); }); //监听进度事件 queue.on("progress", function (e) { var proNum = Math.ceil(e.progress * 100); // $('.loading_text_number').html(proNum + '%') if (proNum >= 100) { console.log('到100了'); that.ImagesLoad = true; } }); queue.on("complete", handleComplete, this); } else { $('.loading_wrap').remove(); that.Init(); } }, SvgDefault: function () { for (var i = 0; i < $(".index_case_animate circle").length; i++) { var OffSet = Math.ceil($(".index_case_animate circle").get(i).getTotalLength()); // console.log(OffSet); $('.index_case_animate circle').eq(i).css({ strokeDasharray: OffSet, strokeDashoffset: OffSet, }); } }, //默认方法 HtmlInit: function () { var that = this; $('body').addClass('body_animate'); that.AddEventList(); // that.footAnimate(); that.maoAnimate(); //add that.WapNav(); that.IndexBannerPicSwiper(); that.IndexBannerSwiper(); that.MouseWheel(); that.IndexCustomersPrevSwiper(); that.IndexCustomersNextSwiper(); that.IndexNewsSwiper(); that.AboutLayoutSwiper(); that.InnovationPageSwiper(); that.DutyListSwiper(); that.ProMouseSwiper(); that.ProBigSwiper(); that.ProHeadSwiper(); that.ProDetailsSwiper(); that.Scrollbar(); }, }; $(function () { IqwXiongJs.Loading(); });