/* * JS基础处理框架 * -- 提倡互联网共享,同时应尊重原创作者,网站制作属: 爱企云 -- * * @company: iqweb * @author: jackey * timer: 2021年 * Tel:18565633435 * QQ:897232289 * WeChat:18565633435 */ var IqwXiongJs = { Width: $(window).width(), Height: $(window).height(), //锚点距离 maoNumber: 100, mClick: [], //数字滚动判断 NumberIf: true, Number: [], //有锚点才吸顶 maoTop: false, bannerAnimation: 'AddFadeInUp', //滚动条 MyScroll: null, //增加 WapNavIF: true, BannerSwiper: null, bodyTabSwiper: null, IndexColorSwiper: null, honorSwiper: null, colorSwiper1: null, colorSwiper2: null, colorSwiper3: null, colorSwiper4: null, colorSwiper5: null, colorSwiper6: null, developmentSwiper: null, photoSwiper: null, IndexNewsSwiper: null, // 20230725新增 AddProItemTab1: null, AddProItemTab2: null, AddProItemTab3: null, AddProItemTab4: null, AddProItemTab5: null, AddProItemTab6: null, pageX: 0, pageY: 0, //EventKey: "ontouchstart" in document.documentElement ? "touchstart" : "click", Init: function () { var that = this; that.AddEventList(); that.HtmlInit(); }, //滚动数字 numberRoll: function () { var that = this; //窗口滚动 var dataTop = $('.index_number').offset().top; var dataH = dataTop - that.Height; var scrollTop = $(window).scrollTop(); if (scrollTop > dataH && scrollTop < dataTop) { // that.NumberCount(); that.indexNumber() } $(window).scroll(function () { var dataTop = $('.index_number').offset().top; var dataH = dataTop - that.Height; var scrollTop = $(window).scrollTop(); if (scrollTop > dataH && scrollTop < dataTop) { // that.NumberCount(); that.indexNumber() } }); }, //科研平台圆形 circularBox: function () { var that = this; if ($('.circular_content_box').length > 0) { //窗口滚动 var dataTop = $('.circular_content_box').offset().top; var dataH = dataTop - that.Height; var scrollTop = $(window).scrollTop(); if (scrollTop > dataH && scrollTop < dataTop) { $('.circular_content_box').addClass('circular_active'); } $(window).scroll(function () { var dataTop = $('.circular_content_box').offset().top; var dataH = dataTop - that.Height; var scrollTop = $(window).scrollTop(); if (scrollTop > dataH && scrollTop < dataTop) { $('.circular_content_box').addClass('circular_active'); } }); } }, //核心技术圆形 CoreBox: function () { var that = this; if ($('.core_circular_box').length > 0) { //窗口滚动 var dataTop = $('.core_circular_box').offset().top; var dataH = dataTop - that.Height; var scrollTop = $(window).scrollTop(); if (scrollTop > dataH && scrollTop < dataTop) { $('.core_circular_box').addClass('core_circular_active'); } $(window).scroll(function () { var dataTop = $('.core_circular_box').offset().top; var dataH = dataTop - that.Height; var scrollTop = $(window).scrollTop(); if (scrollTop > dataH && scrollTop < dataTop) { $('.core_circular_box').addClass('core_circular_active'); } }); } }, indexNumber: function () { var that = this; if (that.NumberIf) { var numberL = $('.index_number'); for (var i = 0; i < numberL.length; i++) { numberL.eq(i).html(that.Number[i]); } $('.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; } }, //banner bodyTab: function () { var that = this; if (that.Width < 1200) { $('.footer_back_item').removeClass('banner_animation'); $('.footer_list_box').removeClass('banner_animation'); } that.bodyTabSwiper = new Swiper('.index_body_tab', { // loop: true, direction: 'vertical', // effect: 'fade', mousewheel: true, grabCursor: true, watchSlidesProgress: true, mousewheelControl: true, keyboardControl: true, keyboard: true, speed: 600, slidesPerView: 'auto', // autoHeight:true, // autoplay: { // delay: 15000, // stopOnLastSlide: true, // disableOnInteraction: false, // }, pagination: { el: '.index_body_pagination', clickable: true, }, on: { init: function () { $('.header_wrap').addClass('topHeader'); $('.index_body_pagination').addClass('LeftBox'); // $('.index_core_width').css({ // width: $('.index_core_back').width() + 'px' // }) }, slideChangeTransitionStart: function () { if (this.realIndex == 0) { $('.index_body_pagination').removeClass('pagination_black'); } if (this.realIndex == 1) { $('.index_body_pagination').addClass('pagination_black'); $('.header_wrap').removeClass('topHeader'); } if (this.realIndex == 2) { $('.index_body_pagination').removeClass('pagination_black'); that.IndexParallax(); $('.header_wrap').removeClass('topHeader'); } if (this.realIndex == 3) { $('.index_body_pagination').addClass('pagination_black'); $('.header_wrap').removeClass('topHeader'); } if (this.realIndex == 4) { $('.index_body_pagination').removeClass('pagination_black'); $('.header_wrap').removeClass('topHeader'); } }, slideChangeTransitionEnd: function () { if (this.realIndex == 0) { $('.banner_animation').removeClass(that.bannerAnimation); $('.index_body_slide0 .banner_animation').addClass(that.bannerAnimation); var ItemLength = $('.index_body_slide0 .banner_animation'); for (var j = 0; j < ItemLength.length; j++) { ItemLength.eq(j).addClass('d' + (j + 1)); } $('.index_color_list').removeClass('index_color_active'); $('.header_wrap').addClass('topHeader'); } if (this.realIndex == 1) { $('.banner_animation').removeClass(that.bannerAnimation); $('.index_body_slide1 .banner_animation').addClass(that.bannerAnimation); $('.index_core_width').removeClass('index_core_active'); var ItemLength = $('.index_body_slide1 .banner_animation'); for (var j = 0; j < ItemLength.length; j++) { ItemLength.eq(j).addClass('d' + (j + 1)); } $('.index_color_list').addClass('index_color_active'); } if (this.realIndex == 2) { $('.banner_animation').removeClass(that.bannerAnimation); $('.index_body_slide2 .banner_animation').addClass(that.bannerAnimation); $('.index_core_width').removeClass('index_core_active'); var ItemLength = $('.index_body_slide2 .banner_animation'); for (var j = 0; j < ItemLength.length; j++) { ItemLength.eq(j).addClass('d' + (j + 1)); } $('.index_color_list').removeClass('index_color_active'); } if (this.realIndex == 3) { $('.banner_animation').removeClass(that.bannerAnimation); $('.index_body_slide3 .banner_animation').addClass(that.bannerAnimation); $('.index_core_width').removeClass('index_core_active'); var ItemLength = $('.index_body_slide3 .banner_animation'); for (var j = 0; j < ItemLength.length; j++) { ItemLength.eq(j).addClass('d' + (j + 1)); } $('.index_color_list').removeClass('index_color_active'); } if (this.realIndex == 4) { $('.banner_animation').removeClass(that.bannerAnimation); $('.index_body_slide4 .banner_animation').addClass(that.bannerAnimation); $('.index_core_width').removeClass('index_core_active'); var ItemLength = $('.index_body_slide4 .banner_animation'); for (var j = 0; j < ItemLength.length; j++) { ItemLength.eq(j).addClass('d' + (j + 1)); } $('.index_color_list').removeClass('index_color_active'); } } } }); }, //banner BannerTab: function () { var that = this; that.BannerSwiper = new Swiper('.index_banner_tab', { loop: true, effect: 'fade', speed: 600, pagination: { el: '.index_banner_pagination', clickable: true, }, autoplay: { delay: 10000, stopOnLastSlide: false, disableOnInteraction: false, }, on: { init: function () { }, slideChangeTransitionStart: function () { }, slideChangeTransitionEnd: function () { if (this.realIndex == 0) { $('.fade_animation').removeClass(that.bannerAnimation); $('.index_banner_slide0 .fade_animation').addClass(that.bannerAnimation); } if (this.realIndex == 1) { $('.fade_animation').removeClass(that.bannerAnimation); $('.index_banner_slide1 .fade_animation').addClass(that.bannerAnimation); } if (this.realIndex == 2) { $('.fade_animation').removeClass(that.bannerAnimation); $('.index_banner_slide2 .fade_animation').addClass(that.bannerAnimation); } } } }); }, //首页 IndexColorTab: function () { var that = this; if (that.Width > 1200) { that.IndexColorSwiper = new Swiper('.index_color_tab', { loop: true, speed: 600, slidesPerView: 4, spaceBetween: 20, autoplay: { delay: 6000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: '.index_color_next', prevEl: '.index_color_prev', }, }); $('.index_color_item ').hover(function () { console.log('自动切换暂停'); that.IndexColorSwiper.autoplay.stop(); }, function () { console.log('自动切换开始'); that.IndexColorSwiper.autoplay.start(); }); } else { $('.index_color_tab').removeClass('swiper-no-swiping'); } }, //新闻 IndexNewsTab: function () { var that = this; if (that.Width < 1200) { that.IndexNewsSwiper = new Swiper('.news_index_tab', { loop: true, speed: 600, pagination: { el: '.news_index_pagination', }, }); } }, honorTab: function () { var that = this; var slidesView = 4.2; if (that.Width < 1200) { slidesView = 2; } that.honorSwiper = new Swiper('.patent_page_swiper', { loop: true, speed: 600, slidesPerView: slidesView, centeredSlides: true, navigation: { nextEl: '.patent_honor_next', prevEl: '.patent_honor_prev', }, }); }, //图册 photoTab: function () { var that = this; that.photoSwiper = new Swiper('.photo_tab', { loop: true, speed: 600, navigation: { nextEl: '.photo_next', prevEl: '.photo_prev', }, }); }, colorTab1: function () { var that = this; that.colorSwiper1 = new Swiper('.colorTab1', { effect: 'fade', speed: 600, on: { init: function () { $('.color_blue .pro_button_item').eq(0).addClass('pro_button_active'); $('.color_blue .pro_button_item').hover(function () { that.colorSwiper1.slideTo($(this).index()); $('.color_blue .pro_button_item').eq($(this).index()).addClass('pro_button_active').siblings().removeClass('pro_button_active'); }) } } }); }, colorTab2: function () { var that = this; that.colorSwiper2 = new Swiper('.colorTab2', { effect: 'fade', speed: 600, on: { init: function () { $('.color_green .pro_button_item').eq(0).addClass('pro_button_active'); $('.color_green .pro_button_item').hover(function () { that.colorSwiper2.slideTo($(this).index()); $('.color_green .pro_button_item').eq($(this).index()).addClass('pro_button_active').siblings().removeClass('pro_button_active'); }) } } }); }, colorTab3: function () { var that = this; that.colorSwiper3 = new Swiper('.colorTab3', { effect: 'fade', speed: 600, on: { init: function () { $('.color_blue2 .pro_button_item').eq(0).addClass('pro_button_active'); $('.color_blue2 .pro_button_item').hover(function () { that.colorSwiper3.slideTo($(this).index()); $('.color_blue2 .pro_button_item').eq($(this).index()).addClass('pro_button_active').siblings().removeClass('pro_button_active'); }) } } }); }, colorTab4: function () { var that = this; that.colorSwiper4 = new Swiper('.colorTab4', { effect: 'fade', speed: 600, on: { init: function () { $('.color_yellow .pro_button_item').eq(0).addClass('pro_button_active'); $('.color_yellow .pro_button_item').hover(function () { that.colorSwiper4.slideTo($(this).index()); $('.color_yellow .pro_button_item').eq($(this).index()).addClass('pro_button_active').siblings().removeClass('pro_button_active'); }) } } }); }, colorTab5: function () { var that = this; that.colorSwiper5 = new Swiper('.colorTab5', { effect: 'fade', speed: 600, on: { init: function () { $('.color_violet .pro_button_item').eq(0).addClass('pro_button_active'); $('.color_violet .pro_button_item').hover(function () { that.colorSwiper5.slideTo($(this).index()); $('.color_violet .pro_button_item').eq($(this).index()).addClass('pro_button_active').siblings().removeClass('pro_button_active'); }) } } }); }, colorTab6: function () { var that = this; that.colorSwiper6 = new Swiper('.colorTab6', { effect: 'fade', speed: 600, on: { init: function () { $('.color_green2 .pro_button_item').eq(0).addClass('pro_button_active'); $('.color_green2 .pro_button_item').hover(function () { that.colorSwiper6.slideTo($(this).index()); $('.color_green2 .pro_button_item').eq($(this).index()).addClass('pro_button_active').siblings().removeClass('pro_button_active'); }) } } }); }, developmentTab: function () { var that = this; var slidesView = 2.9; if (that.Width < 1200) { slidesView = 1; } that.developmentSwiper = new Swiper('.development_tab', { loop: true, speed: 600, slidesPerView: slidesView, navigation: { nextEl: '.development_next', prevEl: '.development_prev', }, }); }, //手风琴 accordion: function () { $('.concept_item').hover(function () { $('.concept_item').eq($(this).index()).addClass('concept_active').siblings().removeClass('concept_active') }) }, //招聘 joinClick: function () { $('.join_item_head').on('click', function (e) { e.preventDefault(); if ($(this).parents('.join_item_li').hasClass('join_item_active')) { $(this).parents('.join_item_li').removeClass('join_item_active'); $(this).parents('.join_item_li').find('.join_item_read').slideUp(); } else { $(this).parents('.join_item_li').addClass('join_item_active'); $(this).parents('.join_item_li').find('.join_item_read').slideDown(); } }); }, //滚动条 Scrollbar: function () { setInterval(function () { $('body').getNiceScroll().resize(); }, 300); var that = this; if (that.Width > 1200) { $(document).ready(function () { $("body").niceScroll({ zindex: "99999", //滚动条颜色 cursorcolor: "#333", //滚动条的透明度,从0-1 cursoropacitymax: 1, //使光标拖动滚动像在台式电脑触摸设备 true滚动条拖动不可用 touchbehavior: false, autohidemode: false, //背景滚动槽颜色 background: "", //滚动条宽度 cursorwidth: "5px", //滚动条两头的圆角 cursorborderradius: "3px", //滚动条的位置 railpadding: { top: 0, right: 2, left: 0, bottom: 0 }, //可以管理鼠标滚轮事件 enablemousewheel: true, //可以管理键盘事件 enablekeyboard: true, //滚动速度 scrollspeed: 100, smoothscroll: true, hidecursordelay: 600, // 鼠标滚动的滚动速度(像素) mousescrollstep: 9 * 4, //仅 boxzoom=true 和触屏设备时有效)激活变焦当 out/in (两个手指外账或收缩) gesturezoom: false, //你可以用鼠标滚动可滚动区域的滚动条和增加鼠标滚轮事件 preservenativescrolling: true, //当按下空格时使页面向下滚动 spacebarenabled: true, //防止多触点时间引发滚动 preventmultitouchscrolling: true, }); }); that.NavScroll(); } else { that.NavScroll(); } }, //锚点特效 maoAnimate: function () { var that = this; if (that.Width < 1200) { that.maoNumber = 60; } that.maoTop = true; var _hash = window.location.hash; //锚点滑动 $('.anchor_mCustom').click(function () { var $target = $(this.hash); console.log($target.selector); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetOffset = $target.offset().top; $('html,body').animate({ scrollTop: targetOffset - that.maoNumber }, 700); return false; } }); if (_hash && $(_hash).get(0)) { $('html,body').animate({ scrollTop: $(_hash).offset().top - that.maoNumber }, 700); } }, //获取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; //移动端首页导航 if (that.scrollTop > 50) { $('.header_wrap').addClass('header_active'); } else { $('.header_wrap').removeClass('header_active'); } if (that.Width > 1200) { if (that.scrollTop > ($('.page_banner_wrap').height() - 10) && $('.page_banner_wrap').length > 0) { $('.page_banner_nav_box').addClass('fixed_top'); $('.header_nav_black').addClass('fixed_top_head'); $('.top_click').addClass('top_click_show'); if (that.Width > 1200) { that.maoNumber = 66; } if (that.Width > 1900) { that.maoNumber = 80; } } else { $('.page_banner_nav_box').removeClass('fixed_top'); $('.header_nav_black').removeClass('fixed_top_head'); $('.top_click').removeClass('top_click_show'); } } //进场play that.FadeInUp(); that.currentThis(); that.FadeInLeft(); that.FadeInRight(); that.ItemInUp(); }, //parallax IndexParallax: function () { $('.scene').parallax(); }, PageParallax: function () { $('.page_scene').parallax(); }, //返回顶部 ReturnTop: function () { var that = this; $('.top_click').on('click', function (e) { e.preventDefault(); var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; $(document.body).animate({ scrollTop: 0 }, 700); $('html').animate({ scrollTop: 0 }, 700); }); }, //子菜单进场 ItemInUp: function () { var that = this; var itemInUp = $('.page_banner_wrap'); for (var i = 0; i < itemInUp.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; itemInUp.addClass('itemInUp'); } }, currentThis: function () { var that = this; var currentItem = $('.current_this'); for (var i = 0; i < currentItem.length; i++) { var Height = that.Height; var Stop = that.scrollTop + Height; if (Stop > currentItem.eq(i).offset().top) { $('.page_banner_nav_item').removeClass('page_banner_nav_active'); $('.page_banner_nav_item').eq(i).addClass('page_banner_nav_active'); } } }, //进场 FadeInUp: function () { var that = this; var fadeInUp = $('.fadeInUp'); for (var i = 0; i < fadeInUp.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > fadeInUp.eq(i).offset().top) { fadeInUp.eq(i).removeClass('RemoveFadeInUp').addClass('AddFadeInUp'); } } }, //左边进场 FadeInLeft: function () { var that = this; var fadeInLeft = $('.fadeInLeft'); for (var i = 0; i < fadeInLeft.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > fadeInLeft.eq(i).offset().top) { fadeInLeft.eq(i).removeClass('RemoveFadeInLeft').addClass('AddFadeInLeft'); } } }, //右边进场 FadeInRight: function () { var that = this; var fadeInRight = $('.fadeInRight'); for (var i = 0; i < fadeInRight.length; i++) { var Height = that.Height * 0.9; var Stop = that.scrollTop + Height; if (Stop > fadeInRight.eq(i).offset().top) { fadeInRight.eq(i).removeClass('RemoveFadeInRight').addClass('AddFadeInRight'); } } }, //移动端导航 WapNav: function () { var that = this; var top = 0;//给top变量一个初始值,以便下方赋值并引用。 $('.header_m_button').on('touchstart', function (e) { e.preventDefault(); if (that.WapNavIF) { $('.header_wrap').addClass('index_nav_box_active'); that.WapNavIF = false; top = $(window).scrollTop(); $('body').css("top", -top + "px"); $('body').addClass('body_flex'); } else { $('.header_wrap').removeClass('index_nav_box_active'); that.WapNavIF = true; $('body').removeClass('body_flex'); $(window).scrollTop(top); } }); }, //视频 VideoPlay: function () { var that = this; var top = 0; $('.about_video_click').on('click', function (e) { e.preventDefault(); top = $(window).scrollTop(); $('body').css("top", -top + "px"); $('body').addClass('body_flex'); $('.about_video_black_wrap').addClass('about_video_active'); $('.about_video_time').trigger('play'); $('.about_content_video_read').trigger('pause'); }); $('.about_video_hide').on('click', function (e) { e.preventDefault(); $('body').removeClass('body_flex'); $(window).scrollTop(top); $('.about_video_black_wrap').removeClass('about_video_active'); $('.about_video_time').trigger('pause'); $('.about_content_video_read').trigger('play'); document.getElementById("about_video_time").currentTime = 0; }); }, //下滑 DownClick: function () { var that = this; var number = 20; if (that.Width < 1200) { number = 0; } if (that.Width > 1200) { number = 35; } if (that.Width > 1900) { number = 20; } $('.page_banner_read_icon').on('click', function (e) { e.preventDefault(); var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; $(document.body).animate({ scrollTop: $('.page_banner_wrap').height() + number }, 700); $('html').animate({ scrollTop: $('.page_banner_wrap').height() + number }, 700) }) }, //事件 AddEventList: function () { var that = this; function return_false() { return false; } $('.nav_black_close').on('click', function (e) { e.preventDefault(); $('.nav_pop_wrap').removeClass('nav_pop_active'); $('.nav_black_item').removeClass('AddFadeInUp').addClass('RemoveFadeInUp'); }); $('.header_button').on('click', function (e) { e.preventDefault(); $('.nav_pop_wrap').addClass('nav_pop_active'); setTimeout(function () { $('.nav_black_item').removeClass('RemoveFadeInUp').addClass('AddFadeInUp'); }, 800); }); $('.page_banner_wap_list').on('click', function (e) { e.preventDefault(); $('.page_banner_nav_list').addClass('page_banner_list_current'); }); $('.page_banner_wap_close').on('click', function (e) { e.preventDefault(); $('.page_banner_nav_list').removeClass('page_banner_list_current'); }); //鼠标经过 if (that.Width > 1200) { $('.page_banner_nav_item').hover(function () { $('.page_banner_nav_item').addClass('itemDefault'); $(this).addClass('itemHover'); }, function () { $('.page_banner_nav_item').removeClass('itemDefault itemHover'); }); $('.header_nav_black .header_nav_item').hover(function () { $('.header_nav_item').addClass('headerItemDefault'); $(this).addClass('headerItemHover'); }, function () { $('.header_nav_item').removeClass('headerItemDefault headerItemHover'); }); } //图册打开 $('.benefits_button_read').on('click', function (e) { e.preventDefault(); $('.photo_wrap').addClass('photo_active'); }); //图册关闭 $('.photo_close').on('click', function (e) { e.preventDefault(); $('.photo_wrap').removeClass('photo_active'); }); }, //Loading Loading: function () { var that = this; var allImages = []; for (var i = 0; i < $('img').length; i++) { allImages.push( {src: $('img').eq(i).attr('src')} ); } console.log(allImages); // console.log(allImages); if ($('.loading_wrap').length > 0) { function handleComplete() { console.log('加载成功'); // if (/Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent)) { // $('.index_body_tab').addClass('index_body_height'); // alert($('html').height()); // $('.index_body_height').css({ // height:$('html').height() - 75 // }); // } else { // console.log('其他浏览器'); // } //加载完成启动网站 $('.loading_content').addClass('loading_hide'); $('.loading_line').addClass('loading_line_active'); $('.loading_wrap').addClass('loading_active'); setTimeout(function () { $('.loading_wrap').remove(); that.Init(); }, 1000); } var queue = new createjs.LoadQueue(); queue.installPlugin(createjs.Sound); queue.loadManifest(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 span').html(proNum); }); queue.on("complete", handleComplete, this); } else { that.Init(); } }, shareX: function () { var that = this; $('head').find('script').eq(0).before(''); (function () { var p = { url: window.location.href, showcount: '1', desc: $('head').find('meta[name=description]').attr('content'), summary: $('head').find('meta[name=keywords]').attr('content'), title: document.title, site: '', pics: '', style: '101', width: 199, height: 30 }; var s = []; for (var i in p) { s.push(i + '=' + encodeURIComponent(p[i] || '')); } var _url = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?' + s.join('&'); $('.icon-qq-copy-copy-copy-copy').attr({ 'version': '1,0', 'target': '_blank', 'href': _url }); })(); /* (function(){ var p = { url: window.location.href, sharesource:'qzone', title: document.title, desc: $('head').find('meta[name=description]').attr('content'), summary: $('head').find('meta[name=keywords]').attr('content'), pics: '' }; var s = []; for (var i in p) { s.push(i + '=' + encodeURIComponent(p[i] || '')); } var _url='https://connect.qq.com/widget/shareqq/index.html?'+ s.join('&'); $('.icon-qq-copy-copy-copy-copy').attr({ 'target':'_blank', 'href':_url }); })(); */ (function () { var p = { url: window.location.href, count: 1, appkey: '2706825840', title: document.title, pic: '', sharesource: 'weibo', language: 'zh_cn' }; var s = []; for (var i in p) { s.push(i + '=' + encodeURIComponent(p[i] || '')); } var _url = 'http://service.weibo.com/share/share.php?' + s.join('&'); $('.footer_icon_icon .icon-sina').attr({ 'target': '_blank', 'href': _url }) })(); (function () { var $btn = $('.footer_icon_icon .icon-wchart'); var $code = $('#qrcode'); var $kang = $('.icon-wx-kang-wrap').eq(0); var $window = $(window); $code.qrcode(window.location.href); function f() { if ($window.width() <= 1200) { $kang.appendTo($('body')); } else { $kang.appendTo($btn); } } f(); $window.resize(f); $btn.click(function () { $btn.addClass('active'); $kang.stop().fadeIn(); }); $(document.body).on('click', function (e) { var _tar = e.target, $tar = $(e.target); if (!$tar.hasClass('icon-wchart') && !$tar.hasClass('icon-wx-kang-wrap') && !$tar.hasClass('icon-wx-kang-inner') && $tar.attr('id') != 'qrcode' && $tar.parent().attr('id') != 'qrcode') { $btn.removeClass('active'); $kang.stop().fadeOut(); } }); $kang.click(function (e) { if (e.target === this) { $btn.removeClass('active'); $kang.stop().fadeOut(); } }); }()); }, //底部跳转链接 hostUrl: function () { var that = this; if (location.host.indexOf("iqweb.cn") >= 0) { console.log('爱企云'); $('.urlItem label').html('网站建设:'); $('.urlItem a').attr({ 'href': 'http://www.iqweb.cn/', 'title': '深圳网站建设' }).html('爱企云'); } if (location.host.indexOf("iqwweb.com") >= 0) { console.log('爱企云'); $('.urlItem label').html('网站建设:'); $('.urlItem a').attr({ 'href': 'http://www.iqweb.cn/', 'title': '深圳网站建设' }).html('爱企云'); } if (location.host.indexOf("iqwweb.net") >= 0) { console.log('爱企云'); $('.urlItem label').html('网站建设:'); $('.urlItem a').attr({ 'href': 'http://www.iqweb.cn/', 'title': '深圳网站建设' }).html('爱企云'); } if (location.host.indexOf("nfyxtime.com") >= 0) { console.log('联合创智'); $('.urlItem label').html('设计支持:'); $('.urlItem a').attr({ 'href': 'http://www.sz4a.cn/', 'title': '深圳品牌设计' }).html('联合创智') } }, //20230725新增 AddProItemSwiper1: function () { var that = this; var TouchMove = true; var aSlidesPerView = 2; var aSpaceBetween = that.Width * 0.03125; if (that.Width < 1200) { aSlidesPerView = 1.2; aSpaceBetween = that.Width * 0.036231884; } that.AddProItemTab1 = new Swiper('.add_pro_tab1 .add_pro_item_swiper', { speed: 600, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, touchStartPreventDefault: false, touchMoveStopPropagation: false, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: ".add_pro_tab1 .add_pro_item_next", prevEl: ".add_pro_tab1 .add_pro_item_prev", }, loopedSlides: $('.add_pro_tab1 .add_pro_item_swiper .swiper-slide').length, on: { init: function () { var aSlide = this.loopedSlides; if (aSlide < 10) { $('.add_pro_tab1 .add_pro_num_default').html('0' + aSlide); } else { $('.add_pro_tab1 .add_pro_num_default').html(aSlide); } if (this.realIndex < 10) { $('.add_pro_tab1 .add_pro_num_current').html('0' + (this.realIndex + 1)); } else { $('.add_pro_tab1 .add_pro_num_current').html((this.realIndex + 1)); } }, slideChangeTransitionStart: function () { $('.add_pro_tab1 .add_pro_num_current').html('0' + (this.realIndex + 1)); } } }); $('.add_pro_tab1 .add_pro_item_box').hover(function () { console.log('自动切换暂停'); that.AddProItemTab1.autoplay.stop(); }, function () { console.log('自动切换开始'); that.AddProItemTab1.autoplay.start(); }); }, AddProItemSwiper2: function () { var that = this; var TouchMove = true; var aSlidesPerView = 2; var aSpaceBetween = that.Width * 0.03125; if (that.Width < 1200) { aSlidesPerView = 1.2; aSpaceBetween = that.Width * 0.036231884; } that.AddProItemTab2 = new Swiper('.add_pro_tab2 .add_pro_item_swiper', { speed: 600, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, touchStartPreventDefault: false, touchMoveStopPropagation: false, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: ".add_pro_tab2 .add_pro_item_next", prevEl: ".add_pro_tab2 .add_pro_item_prev", }, loopedSlides: $('.add_pro_tab2 .add_pro_item_swiper .swiper-slide').length, on: { init: function () { var aSlide = this.loopedSlides; if (aSlide < 10) { $('.add_pro_tab2 .add_pro_num_default').html('0' + aSlide); } else { $('.add_pro_tab2 .add_pro_num_default').html(aSlide); } if (this.realIndex < 10) { $('.add_pro_tab2 .add_pro_num_current').html('0' + (this.realIndex + 1)); } else { $('.add_pro_tab2 .add_pro_num_current').html((this.realIndex + 1)); } }, slideChangeTransitionStart: function () { $('.add_pro_tab2 .add_pro_num_current').html('0' + (this.realIndex + 1)); } } }); $('.add_pro_tab2 .add_pro_item_box').hover(function () { console.log('自动切换暂停'); that.AddProItemTab2.autoplay.stop(); }, function () { console.log('自动切换开始'); that.AddProItemTab2.autoplay.start(); }); }, AddProItemSwiper3: function () { var that = this; var TouchMove = true; var aSlidesPerView = 2; var aSpaceBetween = that.Width * 0.03125; if (that.Width < 1200) { aSlidesPerView = 1.2; aSpaceBetween = that.Width * 0.036231884; } that.AddProItemTab3 = new Swiper('.add_pro_tab3 .add_pro_item_swiper', { speed: 600, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, touchStartPreventDefault: false, touchMoveStopPropagation: false, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: ".add_pro_tab3 .add_pro_item_next", prevEl: ".add_pro_tab3 .add_pro_item_prev", }, loopedSlides: $('.add_pro_tab3 .add_pro_item_swiper .swiper-slide').length, on: { init: function () { var aSlide = this.loopedSlides; if (aSlide < 10) { $('.add_pro_tab3 .add_pro_num_default').html('0' + aSlide); } else { $('.add_pro_tab3 .add_pro_num_default').html(aSlide); } if (this.realIndex < 10) { $('.add_pro_tab3 .add_pro_num_current').html('0' + (this.realIndex + 1)); } else { $('.add_pro_tab3 .add_pro_num_current').html((this.realIndex + 1)); } }, slideChangeTransitionStart: function () { $('.add_pro_tab3 .add_pro_num_current').html('0' + (this.realIndex + 1)); } } }); $('.add_pro_tab3 .add_pro_item_box').hover(function () { console.log('自动切换暂停'); that.AddProItemTab3.autoplay.stop(); }, function () { console.log('自动切换开始'); that.AddProItemTab3.autoplay.start(); }); }, AddProItemSwiper4: function () { var that = this; var TouchMove = true; var aSlidesPerView = 2; var aSpaceBetween = that.Width * 0.03125; if (that.Width < 1200) { aSlidesPerView = 1.2; aSpaceBetween = that.Width * 0.036231884; } that.AddProItemTab4 = new Swiper('.add_pro_tab4 .add_pro_item_swiper', { speed: 600, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, touchStartPreventDefault: false, touchMoveStopPropagation: false, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: ".add_pro_tab4 .add_pro_item_next", prevEl: ".add_pro_tab4 .add_pro_item_prev", }, loopedSlides: $('.add_pro_tab4 .add_pro_item_swiper .swiper-slide').length, on: { init: function () { var aSlide = this.loopedSlides; if (aSlide < 10) { $('.add_pro_tab4 .add_pro_num_default').html('0' + aSlide); } else { $('.add_pro_tab4 .add_pro_num_default').html(aSlide); } if (this.realIndex < 10) { $('.add_pro_tab4 .add_pro_num_current').html('0' + (this.realIndex + 1)); } else { $('.add_pro_tab4 .add_pro_num_current').html((this.realIndex + 1)); } }, slideChangeTransitionStart: function () { $('.add_pro_tab4 .add_pro_num_current').html('0' + (this.realIndex + 1)); } } }); $('.add_pro_tab4 .add_pro_item_box').hover(function () { console.log('自动切换暂停'); that.AddProItemTab4.autoplay.stop(); }, function () { console.log('自动切换开始'); that.AddProItemTab4.autoplay.start(); }); }, AddProItemSwiper5: function () { var that = this; var TouchMove = true; var aSlidesPerView = 2; var aSpaceBetween = that.Width * 0.03125; if (that.Width < 1200) { aSlidesPerView = 1.2; aSpaceBetween = that.Width * 0.036231884; } that.AddProItemTab5 = new Swiper('.add_pro_tab5 .add_pro_item_swiper', { speed: 600, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, touchStartPreventDefault: false, touchMoveStopPropagation: false, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: ".add_pro_tab5 .add_pro_item_next", prevEl: ".add_pro_tab5 .add_pro_item_prev", }, loopedSlides: $('.add_pro_tab5 .add_pro_item_swiper .swiper-slide').length, on: { init: function () { var aSlide = this.loopedSlides; if (aSlide < 10) { $('.add_pro_tab5 .add_pro_num_default').html('0' + aSlide); } else { $('.add_pro_tab5 .add_pro_num_default').html(aSlide); } if (this.realIndex < 10) { $('.add_pro_tab5 .add_pro_num_current').html('0' + (this.realIndex + 1)); } else { $('.add_pro_tab5 .add_pro_num_current').html((this.realIndex + 1)); } }, slideChangeTransitionStart: function () { $('.add_pro_tab5 .add_pro_num_current').html('0' + (this.realIndex + 1)); } } }); $('.add_pro_tab5 .add_pro_item_box').hover(function () { console.log('自动切换暂停'); that.AddProItemTab5.autoplay.stop(); }, function () { console.log('自动切换开始'); that.AddProItemTab5.autoplay.start(); }); }, AddProItemSwiper6: function () { var that = this; var TouchMove = true; var aSlidesPerView = 2; var aSpaceBetween = that.Width * 0.03125; if (that.Width < 1200) { aSlidesPerView = 1.2; aSpaceBetween = that.Width * 0.036231884; } that.AddProItemTab6 = new Swiper('.add_pro_tab6 .add_pro_item_swiper', { speed: 600, loop: true, slidesPerView: aSlidesPerView, spaceBetween: aSpaceBetween, touchStartPreventDefault: false, touchMoveStopPropagation: false, autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: ".add_pro_tab6 .add_pro_item_next", prevEl: ".add_pro_tab6 .add_pro_item_prev", }, loopedSlides: $('.add_pro_tab6 .add_pro_item_swiper .swiper-slide').length, on: { init: function () { var aSlide = this.loopedSlides; if (aSlide < 10) { $('.add_pro_tab6 .add_pro_num_default').html('0' + aSlide); } else { $('.add_pro_tab6 .add_pro_num_default').html(aSlide); } if (this.realIndex < 10) { $('.add_pro_tab6 .add_pro_num_current').html('0' + (this.realIndex + 1)); } else { $('.add_pro_tab6 .add_pro_num_current').html((this.realIndex + 1)); } }, slideChangeTransitionStart: function () { $('.add_pro_tab6 .add_pro_num_current').html('0' + (this.realIndex + 1)); } } }); $('.add_pro_tab6 .add_pro_item_box').hover(function () { console.log('自动切换暂停'); that.AddProItemTab6.autoplay.stop(); }, function () { console.log('自动切换开始'); that.AddProItemTab6.autoplay.start(); }); }, AddProButton: function () { var that = this; $('.add_pro_item_button').hover(function () { $(this).addClass('add_pro_btn_active').siblings().removeClass('add_pro_btn_active'); }); $('body').mousemove(function (e) { that.pageX = e.pageX; that.pageY = e.pageY; TweenLite.to('.add_pro_cursor_wrap', .1, { transform: 'translate(' + that.pageX + 'px,' + that.pageY + 'px) scale(1)', opacity: 1 }); }); $(".add_pro_item_photo").hover(function (e) { $('.add_pro_cursor_wrap').addClass('add_pro_cursor_current'); }, function () { $('.add_pro_cursor_wrap').removeClass('add_pro_cursor_current'); }); }, //默认方法 HtmlInit: function () { var that = this; //add that.Scrollbar(); that.BannerTab(); that.WapNav(); that.ReturnTop(); that.bodyTab(); that.IndexColorTab(); that.honorTab(); that.hostUrl(); window.onload = function () { that.colorTab1(); that.colorTab2(); that.colorTab3(); that.colorTab4(); that.colorTab5(); that.colorTab6(); that.maoAnimate(); }; that.developmentTab(); that.accordion(); that.joinClick(); that.VideoPlay(); that.DownClick(); that.circularBox(); that.PageParallax(); that.CoreBox(); that.photoTab(); that.IndexNewsTab(); that.shareX(); //20230725新增 that.AddProItemSwiper1(); that.AddProItemSwiper2(); that.AddProItemSwiper3(); that.AddProItemSwiper4(); that.AddProItemSwiper5(); that.AddProItemSwiper6(); that.AddProButton(); }, }; $(function () { IqwXiongJs.Loading(); });