/** * Created by shindou on 2016/11/7. */ +function ($) { _pathname = window.location.pathname; if(_pathname=='/'){ $('.navbar-nav').find('li:nth-child(1)').addClass('active'); }; if(_pathname.indexOf('team')>-1){ $('.navbar-nav').find('li:nth-child(2)').addClass('active'); }; if(_pathname.indexOf('case')>-1){ $('.navbar-nav').find('li:nth-child(3)').addClass('active'); }; if(_pathname.indexOf('extras')>-1){ $('.navbar-nav').find('li:nth-child(4)').addClass('active'); }; if(_pathname.indexOf('xmtzhyx')>-1){ $('.navbar-nav').find('li:nth-child(5)').addClass('active'); }; if(_pathname.indexOf('ppdsjzb')>-1){ $('.navbar-nav').find('li:nth-child(6)').addClass('active'); }; if(_pathname.indexOf('news')>-1){ $('.navbar-nav').find('li:nth-child(7)').addClass('active'); }; if(_pathname.indexOf('contact')>-1){ $('.navbar-nav').find('li:nth-child(8)').addClass('active'); }; //濯掍綋浠g悊椤甸潰 $('.media').find('.intro>div').matchHeight(); //鍏充簬鎴戜滑椤甸潰carousel $('.about-carousel').slick({ arrows:false, autoplay:true, autoplaySpeed: 5000, dots:true }); if($(window).width()>768){ $.stellar({ responsive: true, }); }else{ $.stellar({ responsive: true, horizontalOffset: 1200, }); var links = $('.node--type-article').find('.links'); links.find('.node-prev').find('a').html('涓婁竴绡?); links.find('.node-next').find('a').html('涓嬩竴绡?); } $('.celebrity-carousel-1').find('.content').slick({ arrows: false, dots: true, slidesToShow: 3, slidesToScroll: 3, autoplay: true, autoplaySpeed: 5000, rows: 2 }); $('.celebrity-carousel-2').slick({ slidesToShow: 4, slidesToScroll: 4, arrows: true, // autoplay: true, autoplaySpeed: 3000, responsive:[{ breakpoint: 768, // settings:{ // arrows: false, // } }] }); $('.fwkh-logo-carousel').slick({ slidesToShow: 6, slidesToScroll: 6, arrows: true, autoplay: true, autoplaySpeed: 3000, responsive:[{ breakpoint: 768, settings:{ arrows: false, slidesToShow: 3, slidesToScroll: 3 } }] }); $('.xmtzhyx-case__carousel').slick({ autoplay: true, autoplaySpeed: 3000, slidesToShow: 1, slidesToScroll: 1, // arrows: false, // // fade: true, // asNavFor: '.carousel-nav' // slidesToShow: 1, // slidesToScroll: 1, // arrows: false, fade: true, // asNavFor: '.carousel-nav' prevArrow: '.xmtzhyx-case__arrow-prev', nextArrow:'.xmtzhyx-case__arrow-next' }) $('.xmtzhyx-app').slick({ // centerMode: true, // focusOnSelect: true, autoplay: true, autoplaySpeed: 3000, slidesToShow: 1, slidesToScroll: 1, // arrows: false, // // fade: true, // asNavFor: '.carousel-nav' // slidesToShow: 1, // slidesToScroll: 1, // arrows: false, fade: true, // asNavFor: '.carousel-nav' prevArrow: '.app-arrow__prev', nextArrow:'.app-arrow__next' }); // $('.extras').find('.field--name-field-extras-images').slick({ // centerMode: true, // focusOnSelect: true, // // autoplay: true, // // autoplaySpeed: 3000 // }); $('.extras-detail').find('.carousel-for').slick({ // centerMode: true, // focusOnSelect: true, autoplay: true, autoplaySpeed: 3000, // slidesToShow: 1, slidesToScroll: 1, // arrows: false, // // fade: true, // asNavFor: '.carousel-nav' // slidesToShow: 1, // slidesToScroll: 1, // arrows: false, fade: true, asNavFor: '.carousel-nav' }); $('.extras-detail').find('.carousel-nav').slick({ slidesToShow: 4, slidesToScroll: 1, centerMode: false, focusOnSelect: true, arrow:true, adaptiveHeight:true, respondTo: 'slider', asNavFor: '.carousel-for', variableWidth: true, // autoplay: true, // autoplaySpeed: 3000 }); // 鍝佺墝妗堜緥 // $('.brand-cases__carousel').slick({ // slidesToShow: 1, // slidesToScroll: 1, // centerMode: false, // focusOnSelect: true, // arrow:true, // adaptiveHeight:true, // }); var yzmtzy_carousel = $('.yzmtzy-item__carousel').slick({ slidesToShow: 1, slidesToScroll: 1, centerMode: false, focusOnSelect: true, arrow:true, adaptiveHeight:true, responsive:[{ breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1, autoplay:true, autoplaySpeed:2500 } }] }); $('.yzmtzy-nav-item').click(function (e) { var nav_item = $(e.target).parent(); console.log(nav_item.data('slick')); yzmtzy_carousel.slick('slickGoTo',nav_item.data('slick')); $('.yzmtzy-nav-item.active').removeClass('active'); nav_item.addClass('active'); }); $('.team-carousel-item').mouseenter(function (e) { $(this).parent().find('.active').removeClass('active'); $(this).addClass('active'); }) $('.view-display-id-page_1').find('.movie').find('.box').find('.footer').matchHeight(); $('.video-wrapper').find('.front-carousel').slick({ slidesToShow: 1, accessibility: false, autoplay: true, autoplaySpeed: 3000, arrows: false, dots:true }); let page_node_type_case = $('.page-node-type-case'); page_node_type_case.find('.case__content').prepend('
'); page_node_type_case.find('.case__row:nth-child(1)').prepend($('.breadcrumb')); var contact_carousel = $('.contact-map__carousel').slick({ slidesToShow: 1, accessibility: false, // autoplay: true, // autoplaySpeed: 3000, arrows: false, dots:false }); var contact_addr_nav = $('.contact__addr-nav').slick({ slidesToShow: 1, accessibility: false, // autoplay: true, // autoplaySpeed: 3000, arrows: false, dots:false }); $('.contact-nav-item').click(function (e) { let contact_nav_item = $(e.target); contact_carousel.slick('slickGoTo',contact_nav_item.data('slick')); contact_addr_nav.slick('slickGoTo',contact_nav_item.data('slick')); $('.contact-nav-item.active').removeClass('active'); contact_nav_item.addClass('active'); }); let home = $('.home'); if($(window).width()<768){ $('#carousel-video').remove(); if(home.length>0){ document.title = '瀹d紶鐗囧埗浣滃叕鍙?鏄庢槦骞垮憡鐗囨媿鎽?浼佷笟TVC鍒朵綔|涓婃捣椤哄姩骞垮憡鑲′唤鏈夐檺鍏徃'; } }else{ if(document.getElementById("carousel-video")){ videojs('carousel-video',{ "controls": false, "autoplay": true, "preload": "auto","loop": true }); } home.find('.celebrities__2item-height-wrapper').matchHeight(); } if(home.length>0){ $(window).scroll(function () { doctop = $(document).scrollTop()+$(window).height()-100; numbtop = $('.numbers').offset().top; num = $('.numbers h3 span'); set = [];// 瀹氭椂鍣ㄦ暟缁 if(doctop>numbtop){ if(set.length==0){ set.push( setInterval(function () { let current = $($('.numbers h3 span')[0]); current_num = parseInt(current.text()); if(current_num+1<18){ current.text(current_num+1); }else{ current.text(18); clearInterval(set[0]) } } ,200) ) set.push( setInterval(function () { let current = $($('.numbers h3 span')[1]); current_num = parseInt(current.text()); if(current_num+1<50){ current.text(current_num+1); }else{ current.text(50); clearInterval(set[2]) } } ,80) ) set.push( setInterval(function () { let current = $($('.numbers h3 span')[2]); let current_num = parseInt(current.text()); if(current_num+4<200){ current.text(current_num+4); }else{ current.text(200); clearInterval(set[2]) } } ,80) ) set.push( setInterval(function () { current = $($('.numbers h3 span')[3]); current_num = parseInt(current.text()); if(current_num+6<1000){ current.text(current_num+6); }else{ current.text(1000); clearInterval(set[3]) } } ,70) ) } } }) } //鏄庢槦浜岀骇椤礽con椤甸潰 $('.star-body').find('.services-process').find('.col-xs-4').matchHeight(); //鏄庢槦涓夌骇椤甸潰icon楂樺害 $('.path-celebrity').find('.endorsement').find('.col-xs-4').matchHeight(); window._bd_share_config={ "common":{ "bdSnsKey":{}, "bdText":"", "bdMini":"2", "bdMiniList":false, "bdPic":"", "bdStyle":"0" }, "share":{ "bdSize":24, "bdCustomStyle":"../css/share.css", } }; with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)]; // wx.onMenuShareTimeline({ // title: $('.page-header').text(), // 鍒嗕韩鏍囬 // link: '', // 鍒嗕韩閾炬帴锛岃閾炬帴鍩熷悕鎴栬矾寰勫繀椤讳笌褰撳墠椤甸潰瀵瑰簲鐨勫叕浼楀彿JS瀹夊叏鍩熷悕涓€鑷 // imgUrl: ''+$('.field--name-field-case-cover').find('img').attr('src'), // 鍒嗕韩鍥炬爣 // success: function () { // // 鐢ㄦ埛纭鍒嗕韩鍚庢墽琛岀殑鍥炶皟鍑芥暟 // }, // cancel: function () { // // 鐢ㄦ埛鍙栨秷鍒嗕韩鍚庢墽琛岀殑鍥炶皟鍑芥暟 // } // }); // wx.onMenuShareAppMessage({ // title: $('.page-header').text(), // 鍒嗕韩鏍囬 // desc: '', // 鍒嗕韩鎻忚堪 // link: '', // 鍒嗕韩閾炬帴锛岃閾炬帴鍩熷悕鎴栬矾寰勫繀椤讳笌褰撳墠椤甸潰瀵瑰簲鐨勫叕浼楀彿JS瀹夊叏鍩熷悕涓€鑷 // imgUrl: ''+$('.field--name-field-case-cover').find('img').attr('src'), // 鍒嗕韩鍥炬爣 // type: '', // 鍒嗕韩绫诲瀷,music銆乿ideo鎴杔ink锛屼笉濉粯璁や负link // dataUrl: '', // 濡傛灉type鏄痬usic鎴杤ideo锛屽垯瑕佹彁渚涙暟鎹摼鎺ワ紝榛樿涓虹┖ // success: function () { // // 鐢ㄦ埛纭鍒嗕韩鍚庢墽琛岀殑鍥炶皟鍑芥暟 // }, // cancel: function () { // // 鐢ㄦ埛鍙栨秷鍒嗕韩鍚庢墽琛岀殑鍥炶皟鍑芥暟 // } // }); }(jQuery);