(function(a) { if (typeof define === "function" && define.amd) { define(["jquery"], a); } else { a(jQuery); } }(function(a) { a.fn.addBack = a.fn.addBack || a.fn.andSelf; a.fn.extend({ actual: function(b, l) { if (!this[b]) { throw '$.actual => The jQuery method "' + b + '" you called does not exist'; } var f = { absolute: false, clone: false, includeMargin: false, display: "block" }; var i = a.extend(f, l); var e = this.eq(0); var h, j; if (i.clone === true) { h = function() { var m = "position: absolute !important; top: -1000 !important; "; e = e.clone().attr("style", m).appendTo("body"); }; j = function() { e.remove(); }; } else { var g = []; var d = ""; var c; h = function() { c = e.parents().addBack().filter(":hidden"); d += "visibility: hidden !important; display: " + i.display + " !important; "; if (i.absolute === true) { d += "position: absolute !important; "; } c.each(function() { var m = a(this); var n = m.attr("style"); g.push(n); m.attr("style", n ? n + ";" + d : d); }); }; j = function() { c.each(function(m) { var o = a(this); var n = g[m]; if (n === undefined) { o.removeAttr("style"); } else { o.attr("style", n); } }); }; } h(); var k = /(outer)/.test(b) ? e[b](i.includeMargin) : e[b](); j(); return k; } }); }));; (function($, window, document) { "use strict"; var defaults = { deVal: 0, className: 'dataNums', digit: '' }; function rollNum(obj, options) { this.obj = obj; this.options = $.extend(defaults, options); this.init = function() { this.initHtml(obj, defaults); } } rollNum.prototype = { initHtml: function(obj, options) { var strHtml = '
'; obj.html(strHtml); } this.scroNum(obj, options); }, scroNum: function(obj, options) { var number = options.deVal; var $num_item = $(obj).find('.' + options.className).find('.tt'); var h = $(obj).find('.dataBoc').height(); $num_item.css('transition', 'all 2s ease-in-out'); var numberStr = number.toString(); if (numberStr.length <= $num_item.length - 1) { var tempStr = ''; for (var a = 0; a < $num_item.length - numberStr.length; a++) { tempStr += '0'; } numberStr = tempStr + numberStr; } var numberArr = numberStr.split(''); $num_item.each(function(i, item) { setTimeout(function() { $num_item.eq(i).css('top', -parseInt(numberArr[i]) * h - h * 10 + 'px'); }, i * 100) }); } } $.fn.rollNum = function(options) { var $that = this; var rollNumObj = new rollNum($that, options); rollNumObj.init(); }; })(jQuery, window, document); window.onresize = function() { AOS.refresh(); } var _media={}; function _slick(id, pc_stype, pc_slidesToShow, pc_slidesToScroll, pc_dots, pc_arrows, wap_stype, wap_slidesToShow, wap_slidesToScroll, wap_dots, wap_arrows, infinite, autoplay, autoplaySpeed,pc_vertical,wap_vertical) { // 展示方式一致,都是幻灯片 if (pc_stype == wap_stype && pc_stype == 1) { $(id + " .slick").each(function () { $(this).find("ul").eq(0).removeClass("slick-list"); $(this).find("ul").slick({ dots: pc_dots == 1, arrows: pc_arrows == 1, infinite: infinite == 1, autoplay: autoplay == 1, vertical: pc_vertical == 1, autoplaySpeed: autoplaySpeed, slidesToShow: pc_slidesToShow, slidesToScroll: pc_slidesToScroll, lazyLoad: 'progressive', responsive: [{ breakpoint: _media[id], settings: { dots: wap_dots == 1, arrows: wap_arrows == 1, vertical: wap_vertical == 1, slidesToShow: wap_slidesToShow, slidesToScroll: wap_slidesToScroll } }] }); }); } //其中一端是幻灯片 else if (pc_stype == 1 || wap_stype == 1) { $(id + " .slick").each(function () { //拷贝移动端dom,设置PC时隐藏 $(this).find("ul").clone().appendTo($(this)); // 设置PC端dom移动端隐藏 $(this).find("ul").eq(0).addClass("hidden-"+ _media[id]); $(this).find("ul").eq(1).addClass("visible-"+ _media[id]); if (pc_stype == 1) { //PC端是幻灯片 // 移动端是平铺,设置平铺样式 $(this).find("ul").eq(0).removeClass("slick-list"); //PC端绑定幻灯片效果 $(this).find("ul").eq(0).slick({ dots: pc_dots == 1, arrows: pc_arrows == 1, infinite: infinite == 1, autoplay: autoplay == 1, vertical: pc_vertical == 1, autoplaySpeed: autoplaySpeed, slidesToShow: pc_slidesToShow, slidesToScroll: pc_slidesToScroll, lazyLoad: 'progressive' }); } else { //移动端是幻灯片 // PC端是平铺,设置平铺样式 $(this).find("ul").eq(1).removeClass("slick-list"); // 移动端绑定幻灯片 $(this).find("ul").eq(1).slick({ dots: wap_dots == 1, arrows: wap_arrows == 1, autoplay: infinite == 1, infinite: autoplay == 1, vertical: wap_vertical == 1, autoplaySpeed: autoplaySpeed, slidesToShow: wap_slidesToShow, slidesToScroll: wap_slidesToScroll, lazyLoad: 'progressive' }); } }) } } function _baidumap() { if ($('._mapbox').length > 0) { if (window.TILE_VERSION == undefined) { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = "http://api.map.baidu.com/getscript?v=2.0&ak=PGgBx2t0wST5E8OI3dmIYVrzLkurz1BW&services=&t=20140825185308"; document.getElementsByTagName('head')[0].appendChild(script); } for (var i = 0; i < $('._mapbox').length; i++) { $('._mapbox').eq(i).attr('id', "_mapcontent" + i); var style = document.createElement('style'); if ($('._mapbox').eq(i).find('style').length > 0) { style.innerHTML = $('._mapbox').eq(i).find('style').html().split('.').join("\r\n#_mapcontent" + i + " ."); document.getElementsByTagName('head')[0].appendChild(style); } _loadmap(i) } } } function pageInit() { AOS.init({ offset: 0, duration: 700, easing: 'ease-in-sine', delay: 50, disable:window.innerWidth < 1024 }); _baidumap(); //console.log('pageinit') } function _onscroll(scrollTop) { if(window.innerWidth < 1024) { return; } $("._nav_event").each(function() { var config = $(this).attr("_data").split(','); if (config.length == 2 && config[1] != "0") { if (config[1] == "1") { if (scrollTop >= config[0] * 1) $(this).hide(); else $(this).show(); } else if (config[1] == "2") { if (scrollTop >= config[0] * 1) $(this).show(); else $(this).hide(); } else if (config[1] == "3") { if (scrollTop >= config[0] * 1) { $(this).css({ "position": "fixed", "z-index": "15", "top": "0" }) } else $(this).removeAttr("style"); } } else if (config.length == 3 && config[2] != "0") { if (config[0] == "0") { if (config[2] == "1") { if (scrollTop >= config[1] * 1) $(this).hide(); else $(this).show(); } else if (config[2] == "2") { if (scrollTop >= config[1] * 1) $(this).show(); else $(this).hide(); } } else if (config[0] == "1") { var scrollbottom=$(document).height()-scrollTop-$(window).height(); if (config[2] == "1") { if (scrollbottom < config[1] * 1) $(this).hide(); else $(this).show(); } else if (config[2] == "2") { if (scrollbottom < config[1] * 1) $(this).show(); else $(this).hide(); } } } }); } $(window).on('scroll', function() { _onscroll($(document).scrollTop()); }); function _popup(_this) { if ($('#_popup').length == 0) { $('html').append(''); } $('#_popup').html('