// socialshare('.social-share-cs', $config); // 鑾峰彇棣栭〉杞挱鎬绘暟 // console.log(document.getelementsbyclassname('indexswiper1_item')) // 椤堕儴鎼滅储 $('.search_btn').click(function() { $('.searchform').slidetoggle("slow"); }) // 棣栭〉杞挱鍥? var indexswiper = new swiper(".indexswipe", { on: { init: function(swiper) { //swiper鍒濆鍖栦簡 var num = document.getelementsbyclassname('indexswiper1_item').length var num_active = `0${this.activeindex+1}` var index_bannar_num_active = document.getelementsbyclassname('index_bannar_num_active')[0] var index_bannar_num = document.getelementsbyclassname('index_bannar_num')[0] if (num.length == 2) { index_bannar_num.innerhtml = num index_bannar_num_active.innerhtml = num_active } else { num = '0' + num index_bannar_num.innerhtml = num index_bannar_num_active.innerhtml = num_active } }, slidechangetransitionend: function() { // console.log(document.getelementsbyclassname('indexswiper1_item').length, this.activeindex, document.getelementsbyclassname('indexswiper1_item')) var index_bannar_num_active = document.getelementsbyclassname('index_bannar_num_active')[0] // var index_bannar_num = document.getelementsbyclassname('index_bannar_num')[0] if (this.activeindex == 2) { var num_active = `${this.activeindex+1}` index_bannar_num_active.innerhtml = num_active } else { var num_active = `0${this.activeindex+1}` index_bannar_num_active.innerhtml = num_active } }, }, pagination: { el: ".indexswiper-pagination", }, navigation: { nextel: ".swiper-button-next", prevel: ".swiper-button-prev", }, }); var swiper1 = new swiper(".swiper1", { noswiping: true, on: { init: function(swiper) { //swiper鍒濆鍖栦簡 var num = document.getelementsbyclassname('swiper1_item').length var num_active = `0${this.activeindex+1}` var index_bannar_num_active = document.getelementsbyclassname('bannar_num_active')[0] var index_bannar_num = document.getelementsbyclassname('bannar_num')[0] if (num.length == 2) { index_bannar_num.innerhtml = num index_bannar_num_active.innerhtml = num_active } else { num = '0' + num index_bannar_num.innerhtml = num index_bannar_num_active.innerhtml = num_active } }, slidechangetransitionend: function() { var index_bannar_num_active = document.getelementsbyclassname('bannar_num_active')[0] if (this.activeindex == 2) { var num_active = `${this.activeindex+1}` index_bannar_num_active.innerhtml = num_active } else { var num_active = `0${this.activeindex+1}` index_bannar_num_active.innerhtml = num_active } }, }, }); var swiper2 = new swiper(".swiper2", { navigation: { nextel: ".swiper2-button-next", prevel: ".swiper2-button-prev", }, autoplay: { delay: 3000, stoponlastslide: false, disableoninteraction: true, }, controller: { control: swiper1, } }); // 鍏充簬鎴戜滑1-2 var aboutus12_swiper = new swiper(".aboutus12_swiper", { slidesperview: 3, spacebetween: 105, centeredslides: true, initialslide :1, loop: true, navigation: { nextel: ".aboutus12_swiper_prev", prevel: ".aboutus12_swiper_next", }, }); // 鍏充簬鎴戜滑1-3 var aboutus13_swiper = new swiper(".aboutus13_swiper", { slidesperview: 5, spacebetween: 56, // loop: true, speed: 2000, autoplay: true, autoplay: { delay: 2000, stoponlastslide: false, disableoninteraction: true, }, }); $('.aboutus13-item').click(function() { var div = $(this)[0] $(this).addclass('active').siblings().removeclass('active') console.log($('.aboutus13-item')) var swiper = $('.aboutus13_swiper'); var tabbar = $('.tabbar .aboutus13-item'); swiper = [...swiper] tabbar = [...tabbar] tabbar.foreach((item, index, data) => { console.log(item.classname) if (item.classname == 'aboutus13-item active') { swiper[index].classname = 'aboutus13_swiper aboutus13_swiper1 active' } else { swiper[index].classname = 'aboutus13_swiper aboutus13_swiper1 ' } }); var aboutus13_swiper = new swiper(".aboutus13_swiper", { slidesperview: 5, spacebetween: 56, // loop: true, speed: 2000, autoplay: true, autoplay: { delay: 2000, stoponlastslide: false, disableoninteraction: true, }, }); }) // 鍦颁骇2-1 var chanye_swiper1 = new swiper(".chanye_swiper1", { slidesperview: 4, spacebetween: 50, // loop: true, // speed: 2000, // autoplay: true, navigation: { nextel: ".chanye_swiper1_prev", prevel: ".chanye_swiper1_next", }, }); $('.chanye21_swiperbtn').click(function() { var div = $(this)[0] $(this).addclass('active').siblings().removeclass('active') var swiper = $('.chanye_swiper1_box'); var tabbar = $('.chanye21_swiperbtn'); swiper = [...swiper] tabbar = [...tabbar] tabbar.foreach((item, index, data) => { console.log(item.classname) if (item.classname == 'chanye21_swiperbtn active') { swiper[index].classname = 'chanye_swiper1_box chanye_swiper1_box1 ' } else { swiper[index].classname = 'chanye_swiper1_box chanye_swiper1_box1 active' } }); }) // 鍏憡3- var gongao_swiper = new swiper(".gongao_swiper", { speed: 1000, loop: true, autoplay: { delay: 2000, stoponlastslide: false, disableoninteraction: true, }, pagination: { el: ".gongao-swiper-pagination", clickable: true, renderbullet: function(index, classname) { console.log(classname) return '
' + '
' + "
"; }, }, }) // 浼佷笟绮剧 5-1 $('.qiyejingshen-btn').click(function() { var div = $(this).parent().next()[0]; if (div.style.display == 'none') { $(this).parent().addclass("active"); $(this).parent().next().slidetoggle("slow"); } else { $(this).parent().removeclass('active'); $(this).parent().next().slidetoggle("slow"); } // $(this).parent().addclass("active"); // $(this).parent().siblings().removeclass('active'); }) // 鍛樺伐浜掑姩5-2 var newsswiper = new swiper(".news_l .newsswiper", { // loop: true, speed: 1000, // slidesperview: 1, spacebetween: 5, navigation: { nextel: '.news_l_bot .button-next', prevel: '.news_l_bot .button-prev', }, thumbs: { swiper: { el: '.news_l .news_l_bot .newsswiper2 ', // loop: true, freemode: true, speed: 1000, spacebetween: 5, slidesperview: 4, // autoplay: true, watchslidesprogress: true, }, }, }); $(".news_l .news_l_bot .newsswiper2 .swiper-slide").hover(function(e) { var indexto = e.currenttarget.dataset.index; newsswiper.slideto(indexto, 1000, false); $(this).addclass("swiper-slide-thumb-active").siblings().removeclass("swiper-slide-thumb-active"); }, function() { }) var newsswiper_rt = new swiper(".newsswiper_rt", { slidesperview: 1, grid: { fill: 'column', rows: 4, }, speed: 1000, // loop: true, autoplay: { delay: 3000, stoponlastslide: false, disableoninteraction: true, }, // spacebetween: 30, pagination: { el: ".news_r .page", clickable: true, }, }); // 澶т簨璁? var events_swiper = new swiper(".events_swiper", { // loop: true, direction: 'vertical', speed: 700, slidesperview: 'auto', freemode: true, spacebetween: 100, grabcursor: true, //鎸囬拡浼氬彉鎴愭墜鎺屽舰鐘讹紝鎷栧姩鏃舵寚閽堜細鍙樻垚鎶撴墜褰㈢姸 }); // 鍋舵暟 $(".events_swiper .swiper-slide:even .text").addclass('text_align_r') $(".events_swiper .swiper-slide:even .img").addclass('text_align_l') // 濂囨暟 $(".events_swiper .swiper-slide:odd .text").addclass('text_align_l') $(".events_swiper .swiper-slide:odd .img").addclass('text_align_r') $(".jz_body p").css('text-wrap', 'pretty'); $(".jz_body span").css('text-wrap', 'pretty'); // 鎷涜仒淇℃伅5-3 var zhaopinswiper = new swiper(".zhaopin-swiper", { spacebetween: 25, slidesperview: 4, speed: 1000, loop: true, autoplay: { delay: 2000, stoponlastslide: false, disableoninteraction: true, }, pagination: { el: ".zhaopin-swiper-pagination", clickable: true, renderbullet: function(index, classname) { console.log(classname) return '
' + '
' + "
"; }, }, }) // 鑱旂郴鎴戜滑6-1 var contact2 = new swiper(".contactpic-swiper", { slidesperview: 1, loop: true, noswiping: true, noswipingclass: 'stop-swiping', // watchslidesvisibility: true, //闃叉涓嶅彲鐐瑰嚮 // freemode: true, watchslidesprogress: true, }) // swiper.slideto(5) var contact = new swiper(".contact-swiper", { spacebetween: 95, centeredslides: true, slidesperview: 3, loop: true, // watchslidesvisibility: true, thumbs: { swiper: contact2, }, on: { click: function(e) { console.log(e) swiperslideto(e.clickedindex) }, }, navigation: { nextel: '.contact_r_bot ', prevel: '.contact_l_bot ', }, }) function swiperslideto(index) { contact.slideto(index, 1000, false) console.log(index, contact) } // contact.controller.control = contact2; //swiper1鎺у埗swiper2锛岄渶瑕佸湪swiper2鍒濆鍖栧悗 // contact2.controller.control = contact; //swiper2鎺у埗swiper1锛岄渶瑕佸湪swiper1鍒濆鍖栧悗 // link t璺宠浆 $("#sinaweibo").on("click", function() { $(this).socialshare("sinaweibo", { url: '', // content'', title: '' }); }) $("#qzone").on("click", function() { $(this).socialshare("qzone", { url: '', // content'', title: '' }); }) $("#qzone1").on("click", function() { $(this).socialshare("qzone", { url: '', // content'', title: '' }); }) $("#sinaweibo").on("click", function() { $(this).socialshare("sinaweibo", { url: '', // content'', title: '' }); }) $("#weixinshare").on("click", function() { $(this).socialshare("weixinshare", { url: '', // content'', title: '' }); }) $("#sinaweibo").on("click", function() { $(this).socialshare("sinaweibo", { url: '', // content'', title: '' }); }) $(".qzone").on("click", function() { $(this).socialshare("qzone", { url: '', // content'', title: '' }); }) $(".qzone1").on("click", function() { $(this).socialshare("qzone", { url: '', // content'', title: '' }); }) $(".sinaweibo").on("click", function() { $(this).socialshare("sinaweibo", { url: '', // content'', title: '' }); }) $(".weixinshare").on("click", function() { $(this).socialshare("weixinshare", { url: '', // content'', title: '' }); })