//baidutongji var _hmt = _hmt || []; (function () { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?70fb8344cde640aa0e7a4f593e80b742"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); $(document).ready(function () { $(".replaceimg").length > 0 && ($(window).width() > 768 ? $(".replaceimg").each(function (e, t) { var i = $(this).data("pcsrc"); $(this).attr("src", i) }) : $(".replaceimg").each(function (e, t) { var i = $(this).data("wapsrc"); $(this).attr("src", i) })); $(".replaceimg-md").length > 0 && ($(window).width() > 1200 ? $(".replaceimg-md").each(function (e, t) { var i = $(this).data("pcsrc"); $(this).attr("src", i) }) : $(".replaceimg-md").each(function (e, t) { var i = $(this).data("mdsrc"); $(this).attr("src", i) })); (function ($) { $(function ($) { supermap.init(); }); })(jQuery); }); var offSet; var getDiv_md = $(".fixed-nav-box"); var supermap = { init: function () { supermap.sup_click(); supermap.sup_hover(); supermap.sup_bind(); }, sup_click: function () { /*返回顶部*/ $(document).on("click", "#goto_top", function (e) { $('html,body').animate({ scrollTop: 0 }, 700); }), /*手机端导航下拉*/ $(document).on("click", ".navbar-tog", function (e) { $(this).children('em').toggleClass('icondown iconup'); $(this).parent('li').children('ul').slideToggle('in'); }), /*手机端导航下拉*/ $(document).on("click", ".mob_menu", function (e) { $('#mob_nav_container').toggleClass('open'); $('body').toggleClass('mobile-menu-open'); $(this).children('span').toggleClass('iconmenu1 iconclose'); }), /*Download*/ $(document).on("click", ".download_body .table-responsive > div", function (e) { $(this).next().toggleClass('open'); $(this).children('em').toggleClass('icondown iconup'); }), $(document).on("click", ".download_body .table-responsive > ul > li > div", function (e) { $(this).next().toggleClass('open'); $(this).children('em').toggleClass('icondown iconup'); }), /*career*/ $(document).on("click", ".craeers_list", function (e) { $(this).next().slideToggle('open'); $(this).children('h3').children('em').toggleClass('icondown iconup'); }), $(document).on("click", ".fixed-nav-box", function (e) { if ($(window).width() <= 767) { $('.fixed-nav').slideToggle('open'); $('.wap-nav-icon').toggleClass('icondown iconup'); } //return false; }), getDiv_md.length > 0 ? offSet = getDiv_md.offset().top : 0; $(document).on("click", "#sectionCollection li", function (e) { var currentIndex = $(this).index(); var currentText = $(this).text(); $('.wap-nav-title').text(currentText); $("#sectionCollection li").each(function () { if ($(this).index() === currentIndex) { $(this).addClass("current"); } else { $(this).removeClass("current"); } }); $("#sectionBody dl").each(function () { if ($(this).index() === currentIndex) { $(this).css("display", "block"); } else { $(this).css("display", "none"); } }); if ($(window).width() <= 767) { $('.fixed-nav').css("display", "none"); $('.wap-nav-icon').toggleClass('icondown iconup'); } $('html,body').animate({ scrollTop: offSet + 1 }, 700); return false; }) }, sup_hover: function () { $(".drop_menu").hover(function () { $(this).addClass('active'); }, function () { $(this).removeClass('active'); }); }, sup_bind: function () { $(window).scroll(function () { if ($(this).scrollTop() > 1000) { $('#goto_top').fadeIn(); } else { $('#goto_top').fadeOut(); } }); getDiv_md.length > 0 ? offSet = getDiv_md.offset().top : offSet = 0; $(window).scroll(function () { if ($(window).scrollTop() > offSet) { $(".fixed-nav-box").css({ "position": "fixed" }); } else { $(".fixed-nav-box").css({ "position": "static" }); } }) }, }; $(window).load(function () { var swiper01 = new Swiper('.big_ban', { effect: 'fade', lazy: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', clickable: true, }, autoplay: { delay: 5000, //5秒切换一次 }, on: { init: function () { swiperAnimateCache(this); //隐藏动画元素 this.emit('slideChangeTransitionEnd'); //在初始化时触发一次slideChangeTransitionEnd事件 }, slideChangeTransitionEnd: function () { swiperAnimate(this); //每个slide切换结束时运行当前slide动画 } } }); var swiper02 = new Swiper('.index_application', { slidesPerView: 1, spaceBetween: 0, centeredSlides: true, lazy: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }); var swiper03 = new Swiper('.bigdata', { navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, slidesPerView: 3, spaceBetween: 30, lazy: true, grabCursor: true, breakpoints: { 767: { slidesPerView: 1, spaceBetween: 30, } } }); $("img.lazy").lazyload({ threshold: 200, // 设置阀值 effect: "fadeIn" // 设置图片渐入特效 }); }) /** * Share.js * * @author overtrue * @license MIT * * @example *
 * $('.share-components').share();
 *
 * // or
 *
 * $('.share-bar').share({
 *     sites: ['qzone', 'qq', 'weibo','wechat'],
 *     // ...
 * });
 * 
*/ ; (function ($) { /** * Initialize a share bar. * * @param {Object} $options globals (optional). * * @return {Void} */ $.fn.share = function ($options) { var $head = $(document.head); var $defaults = { url: location.href, site_url: location.origin, source: $head.find('[name=site], [name=Site]').attr('content') || document.title, title: $head.find('[name=title], [name=Title]').attr('content') || document.title, description: $head.find('[name=description], [name=Description]').attr('content') || '', image: $('.articleContent img:first').prop('src') || '', mobileSites: [], sites: ['linkedin', 'facebook', 'twitter'], disabled: [], initialized: false }; var $globals = $.extend({}, $defaults, $options); var $templates = { linkedin: '//www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin', facebook: '//www.facebook.com/sharer/sharer.php?u={{URL}}', twitter: '//twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{SITE_URL}}' }; this.each(function () { /* if ($(this).data('initialized')) { return true; } */ var $data = $.extend({}, $globals, $(this).data()); var $container = $(this).addClass('social-share'); createIcons($container, $data); $(this).data('initialized', true); }); /** * Create site icons * * @param {Object|String} $container * @param {Object} $data */ function createIcons($container, $data) { var $sites = getSites($data); $.each($data.mode == 'prepend' ? $sites.reverse() : $sites, function (i, $name) { var $url = makeUrl($name, $data); var $target = ' target="_blank"'; if ($url.indexOf("javascript:") >= 0 || $url.indexOf("mailto:") >= 0) $target = ''; var $link = $data.initialized ? $container.find('.icon-' + $name) : $(''); if (!$link.length) { return true; } $link.prop('href', $url); if (!$data.initialized) { $data.mode == 'prepend' ? $container.prepend($link) : $container.append($link); } }); } /** * Build the url of icon. * * @param {String} $name * @param {Object} $data * * @return {String} */ function makeUrl($name, $data) { var $template = $templates[$name]; $data['summary'] = $data['description']; for (var $key in $data) { if ($data.hasOwnProperty($key)) { var $camelCaseKey = $name + $key.replace(/^[a-z]/, function ($str) { return $str.toUpperCase(); }); var $value = encodeURIComponent($data[$camelCaseKey] || $data[$key]); $template = $template.replace(new RegExp('{{' + $key.toUpperCase() + '}}', 'g'), $value); } } return $template; } /** * Get available site lists. * * @param {Array} $data * * @return {Array} */ function getSites($data) { if ($data['mobileSites'].length === 0) { $data['mobileSites'] = $data['sites']; }; var $sites = (isMobileScreen() ? $data['mobileSites'] : $data['sites']).slice(0); var $disabled = $data['disabled']; if (typeof $sites == 'string') { $sites = $sites.split(/\s*,\s*/); } if (typeof $disabled == 'string') { $disabled = $disabled.split(/\s*,\s*/); } // Remove elements $disabled.length && $.each($disabled, function (i, el) { $sites.splice($.inArray(el, $sites), 1); }); return $sites; } /** * Mobile screen width. * * @return {boolean} */ function isMobileScreen() { return $(window).width() <= 768; } } $(function () { $('.social-share').share(); }); })(jQuery);