/**
* 閫氱敤妯″潡
*/
var $win = $(window), // 鑾峰彇绐楀彛瀵硅薄 BOM
$doc = $(document), // 鑾峰彇鏂囨。瀵硅薄 DOM
$body = $('body', $doc), // 鑾峰彇鏂囨。涓讳綋body
winW = $win.width(); // 鑾峰彇褰撳墠绐楀彛鐨勫搴?涓嶅寘鍚粴鍔ㄦ潯)
$(window).resize(function() { // 绐楀彛澶у皬鏀瑰彉鏃惰Е鍙
winW = $win.width(); // 鏇存柊绐楀彛瀹藉害
});
/**
* 鍥剧墖鎳掑姞杞
*/
$(function(){
$('img.lazy').lazyload({
effect: "fadeIn",
threshold: 400
});
// if (!$.fn.lazyload) return;
// $("img.lazy", $body).lazyload({
// effect: "fadeIn",
// threshold: 200,
// failure_limit: 0
// });
});
// 瀵艰埅鍥哄畾
$(function(){
$win.on('scroll', function(){
var t = $(this).scrollTop(); // 鑾峰彇婊氬姩鏉¤窛绂婚《閮ㄤ綅缃
if (t > 10) {
$('.header').addClass('fixed');
$('.header-button').addClass('fixed');
$('.header .search .page').fadeOut(200);
} else {
$('.header').removeClass('fixed');
$('.header-button').removeClass('fixed');
}
});
$('.header-button').on('mouseenter',function(){
$('.header').addClass('fixed');
$('.header-button').addClass('fixed');
});
});
// 瀵艰埅涓嬪垝绾
$(function(){
$('.header .nav .link>li').on('mouseenter', function(){
$('.header .search .page').fadeOut(200);
$(this).parent().children('li').removeClass('active');
$(this).addClass('active');
});
$('.header .nav .link').on('mouseleave', function(){
$(this).children('li').removeClass('active');
$(this).children('.cur').addClass('active');
});
});
// 浜岀骇鏍忕洰
$(function(){
if (winW < 1200) return false;
$('.header .nav .link>li').on('mouseenter', function(){
$(this).children('.menu').stop().slideDown(200);
}).on('mouseleave', function(){
$(this).children('.menu').stop().slideUp(200);
});
});
// 瀵艰埅鎸夐挳
$(function(){
$('.header .button>div').on('click', function(){
$('.header .search .page').fadeOut(200);
$(this).toggleClass('active');
$('.header .nav').toggleClass('active');
});
});
// 鎵嬫満瀵艰埅
$(function(){
if (winW > 1200) return false;
$('.header .nav .link>li.more>a').on('click', function(event){
event.stopPropagation();
event.preventDefault();
});
$('.header .nav .link').on('mouseenter','>li.more.active', function(){
$(this).children('.menu').stop().fadeIn(200);
}).on('mouseleave','>li.more.active', function(){
$(this).children('.menu').stop().fadeOut(200);
});
});
// 鎼滅储 search
$(function(){
$('.header .search').on('click','p', function(){
$(this).parent().children('.page').stop().fadeIn(200);
$(this).parent().find('.page input').focus();
});
$('.header .search .page .close').on('click', function(){
$(this).parent().parent().fadeOut(200);
});
});
// 杩斿洖椤堕儴
$(function(){
$win.on('scroll', function(){
var t = $(this).scrollTop();
if (t > 1000) {
$('.back-top').addClass('active');
} else {
$('.back-top').removeClass('active');
}
});
$('.backtop').on('click', function(){
$('html, body').animate({ scrollTop: 0 }, 400);
});
});
// 鏁板瓧婊氬姩
$(function(){
$('.counter').countUp();
});
// 閿氱偣婊戝姩
$(function(){
$(".smooth").click(function() {
var href = $(this).attr("href");
var pos = $(href).offset().top - 0;
$("html,body").animate({ scrollTop: pos }, 1000);
return false;
});
});
// 鍔ㄧ敾瀹氫綅
$(function(){
var wow = new WOW({
boxClass: 'wow', // 闇€瑕佹墽琛屽姩鐢诲厓绱犵殑class锛岄粯璁わ細wow
animateClass: 'animate__animated', // animation.css鍔ㄧ敾鐨刢lass锛岄粯璁わ細animated
});
wow.init();
});
// 寮圭獥
$(function(){
$('[data-fancybox]').fancybox({
beforeShow: function() {
$('.caption--image').remove();
},
afterShow: function() {
var caption = $(".fancybox-caption"),
innerCaption = caption.clone().addClass('caption--image');
$(".fancybox-slide--current .fancybox-content").append(innerCaption);
caption.not('.caption--image').addClass('caption--bottom');
}
});
});
// 棣栭〉 banner
$(function(){
$('.index-banner').css('height','auto');
var indexBanner = $('.index-slick').slick({
autoplay: false, // 鏄惁鑷姩鎾斁
autoplaySpeed: 3000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: true, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 1, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: true, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: false, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 768,
settings: {
slidesToShow: 1
}
}
],
});
// banner 鍙充晶瀵艰埅鍒楄〃
indexBanner.on('beforeChange', function(event, slick, currentSlide, nextSlide){
var index = nextSlide + 1;
$('.index-banner .r-list li').removeClass('active');
$('.index-banner .r-list li:nth-child('+index+')').addClass('active');
});
$('.index-banner .r-list li').on('click', function(){
var index = $(this).index();
indexBanner.slick('slickGoTo', index);
});
// banner鍥惧彧鏈変竴寮犻殣钘忓渾鐐规寚绀哄櫒
var bannerNum = $('.index-slick .slick-slide').length;
if (bannerNum <= 1) {
$('.slick .slick-dots').hide();
}
var bannerVideo = document.getElementById('banner-video');
function init() {
if (bannerVideo) {
indexBanner.addClass('hide-dots');
// onloadedmetadata js浜嬩欢锛岃棰戝厓鏁版嵁鍔犺浇鍚庤Е鍙
bannerVideo.onloadedmetadata = function(){
// 瑙嗛鎾斁缁撴潫
bannerVideo.addEventListener('ended', function(){
indexBanner.slick('slickNext');
});
}
} else {
indexBanner.slick('slickPlay'); // 寮€濮嬭嚜鍔ㄦ挱鏀
}
}
init();
if (!bannerVideo) return;
indexBanner.on('beforeChange', function(event, slick, currentSlide, nextSlide){
if (winW < 767) return;
if (nextSlide == 0) {
indexBanner.addClass('hide-dots');
indexBanner.slick('slickPause');
bannerVideo.play();
} else {
indexBanner.removeClass('hide-dots');
indexBanner.slick('slickPlay');
bannerVideo.pause();
}
});
// https://gitcode.gitcode.host/docs-cn/video.js-docs-cn/index.html
var options = {
autoplay: true, // 鏄惁鑷姩鎾斁
muted: true, // 鏄惁闈欓煶
loop: false, // 鏄惁寰幆鎾斁
controls: false, // 鏄惁鏄剧ず搴曢儴鎺у埗鏍
preload: 'auto', // auto鑷姩棰勫姞杞斤紝metadata浠呭姞杞借棰戝厓鏁版嵁锛宯one涓嶅姞杞戒换浣曟暟鎹
// poster: '../images/index-banner-1.jpg', // 鎾斁鍓嶆樉绀虹殑鍥惧儚
aspectRatio: '1920:937', // 璁剧疆鎾斁鍣ㄤ负娴佷綋妯″紡锛屽姩鎬佽绠楁挱鏀惧櫒澶у皬
}
var player = videojs('banner-video', options, function(){
// this.play();
bannerVideo.play();
this.on('ended', function(){
console.log('end');
indexBanner.slick('slickNext');
});
});
});
// 棣栭〉-浜т笟鍙戝睍
$(function(){
$('.index-develop .con .list').on('mouseenter', function(){
$(this).parent().children('.list').removeClass('active');
$(this).addClass('active');
});
});
// 棣栭〉-鐢熶骇甯冨眬
$(function(){
var layoutSlick = $('.layout-slick').slick({
autoplay: false, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: false, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 6.5, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: false, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: false, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: false, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 1440,
settings: {
slidesToShow: 5.5
}
},
{
breakpoint: 1280,
settings: {
slidesToShow: 4.5
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 3.5
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 2
}
},
],
});
$('.index-layout .bottom .con').on('mouseenter', function(){
$(this).parent().children('.con').removeClass('active');
$(this).addClass('active');
});
$('.index-layout .bottom .con .list .slick-slide').on('mouseenter', function(){
var index = $(this).index()+1;
$(this).parent().children('.slick-slide').removeClass('active');
$(this).addClass('active');
});
$('.index-layout .bottom .con:nth-child(1) .list .slick-slide').on('mouseenter', function(){
var index = $(this).index()+1;
$('.index-layout .map .yellow span').removeClass('active');
$('.index-layout .map .red span').removeClass('active');
$('.index-layout .map .red span:nth-child('+index+')').addClass('active');
});
$('.index-layout .bottom .con:nth-child(2) .list .slick-slide').on('mouseenter', function(){
var index = $(this).index()+1;
$('.index-layout .map .red span').removeClass('active');
$('.index-layout .map .yellow span').removeClass('active');
$('.index-layout .map .yellow span:nth-child('+index+')').addClass('active');
});
});
// 棣栭〉-鏂伴椈涓績
$(function(){
var newSlick = $('.new-slick').slick({
autoplay: true, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: true, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 1, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: true, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: false, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 767,
settings: {
slidesToShow: 1
}
},
],
});
});
// 鍐呴〉瀵艰埅
$(function(){
$('.page-nav .con .link a').on('mouseenter', function(){
$(this).parent().children('a').removeClass('active');
$(this).addClass('active');
});
$('.page-nav .con .link').on('mouseleave', function(){
$(this).children('a').removeClass('active');
$(this).children('.cur').addClass('active');
});
// 鍐呴〉瀵艰埅婊戝姩
if ($("#list-nav").length > 0) {
$child = $($("#list-nav .active").get(0));
$parent = $("#list-nav");
$parent.animate({ scrollLeft: $parent.scrollLeft() + $child.offset().left - $parent.offset().left }, 1000);
}
});
// 鍙戝睍鍘嗙▼
$(function(){
$('.about-history .top .text p').on('mouseenter', function(){
var index = $(this).index()+1;
$(this).parent().children('p').removeClass('active');
$(this).addClass('active');
$('.about-history .top .img p').removeClass('active');
$('.about-history .top .img p:nth-child('+index+')').addClass('active');
});
$('.about-history .bottom .time a').on('click', function(){
var hisTop = $("#text-nav").offset().top - 140;
$('html, body').animate({ scrollTop: hisTop }, 400);
$(this).parent().children('a').removeClass('active');
$(this).addClass('active');
$tt = $(this);
$time = $('#time-nav');
$time.animate({ scrollTop: $time.scrollTop() + $tt.offset().top - $time.offset().top - 90 }, 1000);
var id = $(this).attr('data-id');
$child = $('#'+id);
$parent = $("#text-nav");
$parent.animate({ scrollTop: $parent.scrollTop() + $child.offset().top - $parent.offset().top }, 1000);
$('.about-history .bottom .text .list .tit').removeClass('active');
$child.next().children('.tit').addClass('active');
});
$('.about-history .bottom .text').on('scroll', function(){
var textTop = $(this).scrollTop();
});
});
// 鑽h獕璧勮川
$(function(){
var galleryTop = new Swiper('.gallery-top', {
spaceBetween: 10,
loop:false,
loopedSlides: 3,
onSlideChangeStart:function(swiper){
console.log(swiper.activeIndex);
$('.about-honor .top .right .swiper-slide').css('border','8px solid #eee');
galleryThumbs.slides[swiper.activeIndex].style.border = '8px solid #e01724';
}
});
var galleryThumbs = new Swiper('.gallery-thumbs', {
direction: 'vertical',
spaceBetween: 10,
slidesPerView: 3,
touchRatio: 0.2,
slideToClickedSlide: true,
loop:false,
loopedSlides: 3,
breakpoints: {
767: {
direction: 'horizontal',
},
},
});
galleryTop.params.control = galleryThumbs;
galleryThumbs.params.control = galleryTop;
if ($('.gallery-top').length) {
galleryThumbs.slides.click(function(){
$('.about-honor .top .right .swiper-slide').css('border','8px solid #eee');
galleryTop.slideTo($(this).index());
galleryThumbs.slides[$(this).index()].style.border = '8px solid #e01724';
});
}
var honorSlick = $('.honor-slick').slick({
autoplay: true, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: false, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 3.5, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: false, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: true, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 767,
settings: {
slidesToShow: 1
}
},
],
});
});
// 棰嗗鍏虫€€
$(function(){
var leaderSlick = $('.leader-slick').slick({
autoplay: true, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: true, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 1, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: true, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: true, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 767,
settings: {
slidesToShow: 1,
arrows: false,
}
},
],
});
});
// 鏂伴椈涓績-闆嗗洟瑕侀椈
$(function(){
$('.news-group .top .r .list').on('mouseenter', function(){
var index = $(this).index()+1;
$('.news-group .top .img').removeClass('active');
$('.news-group .top .img:nth-child('+index+')').addClass('active');
$(this).parent().children('.list').removeClass('active');
$(this).addClass('active');
$('.news-group .top .r .list .con').stop().slideUp();
$(this).find('.con').stop().slideDown();
});
$('.news-group .top .r .list>a').on('click', function(event){
if (winW < 767) {
// event.stopPropagation();
// event.preventDefault();
}
});
});
// 鏂伴椈璇︽儏
$(function(){
// 鏀惧ぇ缂╁皬瀛椾綋
var $biger = $('.news-details .details .con');
var num = parseFloat($biger.css('fontSize'));
$('.switcher-bigger').click(function() {
num = num * 1.1;
$biger.css('fontSize', num + 'px');
});
$('.switcher-small').click(function() {
num = num / 1.1;
$biger.css('fontSize', num + 'px');
});
});
// 浜烘墠鎷涜仒
$(function(){
$('.resource-recruit .list .top').on('click', function(){
$(this).parent().parent().find('.list .bottom').stop().slideUp();
$(this).parent().children('.bottom').stop().slideDown();
$('.resource-recruit .list').removeClass('active');
$(this).parent().addClass('active');
});
$('.resource-recruit .list .bottom .link .application').on('click', function(){
var tit = $(this).parent().parent().parent().find('.top>div p:first-child').text();
$('.recruit-message .con .title p').html(tit);
$('.recruit-message .con .job-title').val(tit);
$('.recruit-message').show();
});
$('.recruit-message .con .list .reset').on('click', function(event){
event.preventDefault();
$('.recruit-message').hide();
});
$('.recruit-message .con .title .close').on('click', function(){
$('.recruit-message').hide();
});
});
// 鑱旂郴鎴戜滑
$(function(){
$('.contact .bottom .left .con .list .text a').on('click', function(){
$('.contact .bottom .left .con .list .text a').removeClass('active');
$(this).addClass('active');
});
});
// 鍏徃绠€浠
$(function(){
var aboutCompany = document.getElementById('aboutCompany');
$('.about-company .bottom .video .bg').on('click', function(){
$(this).addClass('active');
aboutCompany.play();
});
if (aboutCompany) {
aboutCompany.addEventListener('ended', function(){
$('.about-company .bottom .video .bg').removeClass('active');
});
}
});
// 鍏ㄧ悆甯冨眬
$(function(){
var layoutSlick = $('.lay-slick').slick({
autoplay: true, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: true, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 1, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: true, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: false, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 767,
settings: {
slidesToShow: 1
}
},
],
});
$('.about-layout .con-cn .left .list .icon').on('mouseenter', function(){
$('.about-layout .con-cn .left .list').removeClass('active');
$(this).parent().addClass('active');
var index = $(this).parent().index()+1;
$('.about-layout .con-cn .right .list').removeClass('active');
$('.about-layout .con-cn .right .list:nth-child('+index+')').addClass('active');
});
});
// 涓撳浠嬬粛
$(function(){
var expertTop = new Swiper('.expert-top', {
autoplay: 4000,
slidesPerView: 1.41,
spaceBetween: 50,
loop:true,
loopedSlides: 6,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
breakpoints: {
991: {
spaceBetween: 20,
slidesPerView: 1,
},
},
});
var expertThumbs = new Swiper('.expert-thumbs', {
spaceBetween: 115,
slidesPerView: 6,
touchRatio: 0.2,
slideToClickedSlide: true,
loop:true,
loopedSlides: 6,
breakpoints: {
1680: {
spaceBetween: 90,
},
1440: {
spaceBetween: 60,
},
1200: {
slidesPerView: 5,
spaceBetween: 30,
},
991: {
slidesPerView: 4,
spaceBetween: 20,
},
767: {
slidesPerView: 2,
spaceBetween: 20,
},
},
});
expertTop.params.control = expertThumbs;
expertThumbs.params.control = expertTop;
});
// 鍒涙柊鎴愭灉
$(function(){
$('.achievement-middle .link a').on('click', function(){
$(this).parent().children('a').removeClass('active');
$(this).addClass('active');
var index = $(this).index()+1;
$('.achievement-middle .con .list').removeClass('active');
$('.achievement-middle .con .list:nth-child('+index+')').addClass('active');
});
var achievementSlick = $('.achievement-slick').slick({
autoplay: true, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: false, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 4, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: false, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: true, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 767,
settings: {
slidesToShow: 2
}
},
],
});
$('.achievement-bottom .left .list a').on('click', function(){
$(this).parent().parent().children('.list').removeClass('active');
$(this).parent().addClass('active');
var index = $(this).parent().index()+1;
$('.achievement-bottom .con .list').removeClass('active');
$('.achievement-bottom .con .list:nth-child('+index+')').addClass('active');
});
});
// 绉嶆涓氭湇鍔
$(function(){
var zzySlick = $('.zzy-slick').slick({
autoplay: true, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: true, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 1, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: true, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: false, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
});
});
// 鍥介檯涓氬姟
$(function(){
var gjywSlick = $('.gjyw-slick').slick({
autoplay: false, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: false, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 1, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: true, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: false, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: false, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: false, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 2, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 3, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
draggable: true,
pauseOnHover: false,
responsive: [ // 鍝嶅簲寮
{
breakpoint: 767,
settings: {
slidesPerRow: 1
}
},
],
});
$('.gjyw-slick .slick-slide .img').on('mouseenter', function(){
gjywSlick.slick('slickSetOption',{draggable: false});
}).on('mouseleave', function(){
gjywSlick.slick('slickSetOption',{draggable: true});
});
$('.industry-gjyw .link a').on('click', function(){
$(this).parent().children('a').removeClass('active');
$(this).addClass('active');
var index = $(this).index()+1;
$('.industry-gjyw .con .gjyw').removeClass('active');
$('.industry-gjyw .con .gjyw:nth-child('+index+')').addClass('active');
});
});
// 鏂囧寲鐞嗗康
// $(function(){
// $('.box-list-bg .con .list').on('mouseenter', function(){
// $(this).parent().children('.list').removeClass('active');
// $(this).addClass('active');
// });
// });
// 鏂囧寲鎵嬪唽
$(function(){
var manualTop = new Swiper('.manual-top', {
autoplay: 5000,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
spaceBetween: 10,
loop:true,
loopedSlides: 4,
});
var manualThumbs = new Swiper('.manual-thumbs', {
spaceBetween: 10,
slidesPerView: 4,
touchRatio: 0.2,
slideToClickedSlide: true,
loop:true,
loopedSlides: 4,
pagination: '.swiper-pagination',
paginationType : 'custom',
breakpoints: {
767: {
slidesPerView: 3,
loopedSlides: 3,
}
},
paginationCustomRender: function (swiper, current, total) {
var w = (100 / total) * current;
return "";
}
});
manualTop.params.control = manualThumbs;
manualThumbs.params.control = manualTop;
});
// 绀句細璐d换
$(function(){
$('.liability-top .right .list a').on('mouseenter', function(){
$(this).parent().children('a').removeClass('active');
$(this).addClass('active');
var index = $(this).index()+1;
$('.liability-top .left .img').removeClass('active');
$('.liability-top .left .img:nth-child('+index+')').addClass('active');
});
var liabilityMiddle = new Swiper('.liability-middle-swiper', {
autoplay: 5000,
spaceBetween: 30,
slidesPerView: 3,
touchRatio: 0.2,
slideToClickedSlide: false,
loop:true,
pagination: '.swiper-pagination',
paginationType : 'progress',
breakpoints: {
767: {
slidesPerView: 1,
}
},
});
var activitySlick = $('.activity-slick').slick({
autoplay: true, // 鏄惁鑷姩鎾斁
autoplaySpeed: 5000, // 鑷姩鎾斁闂撮殧鏃堕棿
centerMode: false, // 灞呬腑瑙嗗浘 slidesToShow涓哄弻鏁扮殑鏃跺€欐厧鐢
centerPadding: '0px', //宸﹀彸涓や晶padding鍊
fade: true, // 鍚敤娣″叆娣″嚭锛宻lidesToShow澶т簬1鏈夐棶棰
speed: 500, // 鍒囨崲鍔ㄧ敾閫熷害
slidesToShow: 1, // 鏄剧ず鐨勫够鐏墖鏁伴噺
slidesToScroll: 1, // 瑕佹粴鍔ㄧ殑骞荤伅鐗囨暟閲
pauseOnHover: false, // 鎮仠鏃舵槸鍚︽殏鍋滆嚜鍔ㄦ挱鏀
dots: true, // 鏄惁鏄剧ず鍦嗙偣鎸囩ず鍣
arrows: false, // 鏄惁寮€鍚乏鍙冲垏鎹㈢澶 涓婁竴椤碉紝涓嬩竴椤
touchThreshold: 100, // 婊戝姩鍒囨崲闃堝€硷紝鍗虫粦鍔ㄥ灏戝儚绱犲悗鍒囨崲
cssEase: 'ease', //CSS3鍔ㄧ敾缂撳拰
focusOnSelect: true, //鍚敤閫夊畾鍏冪礌鐨勭劍鐐癸紙鍗曞嚮锛
infinite: true, //鏃犻檺寰幆
swipeToSlide: true, //鍏佽鐢ㄦ埛灏嗗够鐏墖鐩存帴鎷栧姩鎴栨粦鍔ㄥ埌骞荤伅鐗
lazyLoad: 'ondemand', //鎺ュ彈'ondemand'鎴?progressive'
variableWidth: false, //骞荤伅鐗囧搴﹁嚜閫傚簲
adaptiveHeight: false, //鑷€傚簲楂樺害
rows: 1, //灏嗗叾璁剧疆涓?浠ヤ笂灏嗗垵濮嬪寲缃戞牸妯″紡銆備娇鐢╯lidesPerRow璁剧疆姣忚搴旀斁缃灏戜釜骞荤伅鐗
slidesPerRow: 1, //鍦ㄩ€氳繃琛岄€夐」鍒濆鍖栫綉鏍兼ā寮忔椂锛岃繖浼氳缃瘡涓綉鏍艰涓殑骞荤伅鐗囨暟閲
pauseOnHover: false,
});
});
// 鏂伴椈-瑙嗛涓績
$(function(){
$('.news-video .top .right .list').on('click', function(){
var newVideo = document.querySelector('.news-video .top .left .video video');
newVideo.pause();
});
});
/* 鍙嬫儏閾炬帴 */
$(function(){
$('.footer .top .left .logo .link > div a').on('mouseenter', function(){
var index = $(this).index() + 1;
$('.link-container .link-slide').stop().slideUp();
$('.link-container .link-slide:nth-child('+index+')').stop().slideDown();
$('.footer .top .left .logo .link a').removeClass('active');
$(this).addClass('active');
})
$('.footer .top .link-slide').on('mouseleave', function(){
$('.link-container .link-slide').slideUp();
$('.footer .top .left .logo .link a').removeClass('active');
});
$('.footer .top .left .nav').on('mouseenter', function(){
$('.link-container .link-slide').slideUp();
$('.footer .top .left .logo .link a').removeClass('active');
})
})