锘?(function () { // 绉婚櫎鍥剧墖瀹介珮 $(".removeimg").find("section").removeAttr("width").css("width", "100%"); $(".removeimg").find("img").removeAttr("width").css("width", "auto").css("max-width", "100%"); $(".removeimg").find("img").removeAttr("height").css("height", "auto"); $(".removeimg span").remove('margin').css("margin", "auto"); $(".removeimg span").remove('width').css("width", "auto"); $(".removeimg span").remove('height').css("height", "100%"); $(".removeimg p").remove('text-indent').css("text-indent", "0"); $(".removeimg p").remove('height').css("height", "100%"); $("table").remove('text-indent').attr("text-indent", '0'); $("table").remove('width').attr("width", '100%'); $("table").remove('border').attr("border", '1'); //瑙嗛澶勭悊 $(".videoIFrame").attr("width", "100%").attr("height", 200); }); // =======杞挱鍥惧垵濮嬪寲======== $(document).ready(function () { var mySwiper_banner = new Swiper('#banner > .swiper-container', { loop: true, // 寰幆妯″紡閫夐」 // 鑷姩鎾斁 autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: true, }, // 鍒嗛〉鍣 pagination: { el: '#pagination-banner', }, on: { slideChangeTransitionStart: function () { $('#banner .swiper-slide').find('h3').hide().removeClass('') }, slideChangeTransitionEnd: function () { var index = this.activeIndex var animate switch (index) { case 0: animate = 'bounceInDown' break case 1: animate = 'rotateIn' break case 2: animate = 'slideInUp' break case 3: animate = 'zoomIn' break case 4: animate = 'bounceInDown' break case 5: animate = 'rotateIn' break } animate += ' animated' $('#banner .swiper-slide').eq(index).find('h3').show().addClass(animate) }, }, }) var htmlFontSize = $('html').css('font-size') var unit = htmlFontSize.slice(-2) var space = parseFloat(htmlFontSize) * .4 var index = $('#banner-solution .swiper-slide.active').index() var mySwiper_solution = new Swiper('#banner-solution', { freeMode: true, slidesPerView: 3.6, spaceBetween: space, freeModeMomentumBounce: false, slidesOffsetAfter: space / 2, initialSlide: index, }) var muSwiper_tech = new Swiper('#banner-tech > .swiper-container', { slidesPerView: 3.3, spaceBetween: space, slidesOffsetAfter: space / 2, centerInsufficientSlides: true, }) var mySwiper_cases = new Swiper('#related-case > .swiper-container', { // 鍒嗛〉鍣 pagination: { el: '#pagination-cases', }, slidesPerView: 2, slidesPerGroup: 2, spaceBetween: space, }) var mySwiper_news = new Swiper('#banner-news > .swiper-container', { loop: true, // 寰幆妯″紡閫夐」 // 鑷姩鎾斁 autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: true, }, // 鍒嗛〉鍣 pagination: { el: '#pagination-banner', }, }) var mySwiper_special = new Swiper('#banner-special > .swiper-container', { loop: true, slidesPerView: 'auto', loopedSlides: 5, slidesPerView: 2.3, spaceBetween: space + 5, centeredSlides: true, }) var mySwiper_qualification = new Swiper('#banner-qualification', { slidesPerView: 2.6, spaceBetween: space, slidesOffsetAfter: space / 2, }) var mySwiper_honor = new Swiper('#banner-honor', { slidesPerView: 2.4, spaceBetween: space, slidesOffsetAfter: space / 2, }) }) // =======瀹归噺鎼滅储======== $(function ($) { $('.form-search input[name = ton]').on('blur', function () { var url var value = parseInt($(this).val()) value = value ? value : 1 value = value <= 0 ? 1 : value if (value > 150) { url = '151-280t' } else if (value > 100 && value <= 150) { url = '101-150t' } else if (value > 75 && value <= 100) { url = '76-100t' } else if (value > 50 && value <= 75) { url = '51-75t' } else if (value > 30 && value <= 50) { url = '31-50t' } else if (value > 20 && value <= 30) { url = '21-30t' } else if (value > 10 && value <= 20) { url = '11-20t' } else { url = '1-10t' } $('#search_capacity').attr('href', '/solution/capacity/' + url + '.html') }) }) // =======鎶€鏈弬鏁板垏鎹↓======= $(function ($) { if ($('.data-para').eq(0).find('table').length > 0) { var col = $('.data-para').eq(0).find('table').eq(0).attr('data-col') col = col ? col : '1' $('.data-para').eq(0).find('table').eq(0).FrozenTable(0, 0, col) $('.technique > .type .swiper-slide').on('click', function () { $(this).addClass('active').siblings('.swiper-slide').removeClass('active') var index = $(this).index() col = $('.data-para').eq(index).find('table').eq(0).attr('data-col') col = col ? col : '1' $('.data-para').eq(index).fadeIn().siblings().hide() $('.data-para').eq(index).find('table').eq(0).FrozenTable(0, 0, col) }) } }) // =======澶撮儴鎼滅储鎸夐挳======== $(function ($) { $('header .head-top .search').on('click', function () { $('header .head-top .inner_c').show().removeClass('slideOutLeft').addClass('slideInRight animated') }) $('header .head-top .inner_c .close').on('click', function () { console.log(111) $('header .head-top .inner_c').removeClass('slideInRight').addClass('slideOutLeft') setTimeout(function () { $('header .head-top .inner_c').hide() }, 800) }) $('header .head-top .inner_c input[name = keywords]').on('blur', function () { var keywords = $(this).val() }) }) // =======渚ц竟瀵艰埅鏍忕殑鏄剧ず涓庨殣钘廄======= $(function ($) { $('.side-nav').hide() $('#side-nav-btn').on('click', function () { if (!$('header').hasClass('active')) { $('header').addClass('active') $('.side-nav').show().removeClass('bounceOutDown').addClass('bounceInDown') } else { $('.side-nav').removeClass('bounceInDown').addClass('bounceOutDown') setTimeout(function () { $('.side-nav').hide() $('header').removeClass('active') }, 600) } }) }) // =======form琛ㄥ崟楠岃瘉======== $(function ($) { var telReg = /^[1][0-9]{9}\d$/ $('form button').on('click', function () { var form = $(this).parent() var tel = form.find("input[name = tel]") var product = form.find("select[name = product]") // 濡傛灉鏈夎鍛婃锛屽厛绉婚櫎璀﹀憡妗 var alertObj = form.parent().find('.alert')[0] if (alertObj) alertObj.remove() // 鍒ゆ柇鏄惁鏈夌數璇濊緭鍏ユ if (tel.length > 0) { // 鑾峰彇鐢佃瘽杈撳叆妗嗙殑鍊 var telval = tel.val() // 瀹氫箟璀﹀憡妗嗙殑鍐呭 var alert = '

璇锋纭~鍐欐墜鏈哄彿

' // 濡傛灉鐢佃瘽杈撳叆妗嗕负绌 锛 鎴栬€呰緭鍏ョ殑涓嶆槸涓€涓墜鏈哄彿 if (!telval || !telReg.test(telval)) { // 寮瑰嚭璀﹀憡妗 锛 骞堕樆姝㈣〃鍗曟彁浜 form.before(alert) form.parent().addClass('shake animated') setTimeout(function () { form.parent().removeClass('shake animated') }, 600) return false } } if (product.length > 0) { var optionIndex = product[0].selectedIndex var productVal = product.find('option').eq(optionIndex).val() if (!productVal) { var alert = '

璇烽€夋嫨鎮ㄩ渶瑕佺殑璁惧

' // 寮瑰嚭璀﹀憡妗 锛 骞堕樆姝㈣〃鍗曟彁浜 form.before(alert) form.parent().addClass('shake animated') setTimeout(function () { form.parent().removeClass('shake animated') }, 600) return false } } }) }) // =======浜у搧銆佹渚嬪鑸?======= $(function ($) { $('.p-nav-list nav a').hide() $('#product-cut').on('click', function () { // ==========鏂规涓€========== // $('.p-nav-list').show().addClass('slideInDown animated').find('nav a').each(function (index,iteam) { // setTimeout(function () { // $(iteam).show().addClass('fadeInDownBig animated') // },index*100) // }) // ==========鏂规浜孆========= $('.p-nav-list').show(function () { $(this).find('nav a').each(function (index, iteam) { setTimeout(function () { $(iteam).show().addClass('fadeInDown animated') }, index * 100) }) }).addClass('slideInDown animated') }) // ==========鏂规涓堼========= // $('.p-nav-list').show(function () { // $(this).find('nav a').each(function (index, iteam) { // setTimeout(function () { // $(iteam).show().addClass('zoomIn animated') // }, index * 100) // }) // }).addClass('slideInDown animated') // }) $('.p-nav-list').on('click', function () { $(this).find('nav a').hide() $(this).fadeOut() }) }) // =======鍔犺浇鏇村鍒楄〃======== $(function ($) { $('#moreList').on('click', function () { var page = $(this).attr('data-page') var classid = $(this).attr('data-classid') $(document).on('ajaxStart', function () { $('.loading').show() }) $(document).on('ajaxComplete', function () { $('.loading').hide() }) $.getJSON('/moreList.php', {page: page , classid: classid}, function (res) { var html = $('#list_m').render(res.list) if (res.page) { $('#moreList').before(html).attr('data-page', res.page) } else { $('#moreList').before(html).after('

鎴戞槸鏈夊簳绾跨殑

').hide() } }) $.views.helpers({ substr: function (string, index, length) { return string.substr(index, length) }, }) }) }) // =======寰俊浜岀淮鐮?======= $(function ($) { $('.contact-others a.wx').on('click', function () { $(this).find('.bg-cover').fadeIn() }) $('.contact-others a.wx .bg-cover').on('click', function () { $(this).fadeOut() return false }) $('.contact-others a.wx .bg-cover img').on('click', function () { return false }) }) // =======灏忛敭鐩樺脊鍑哄鑷撮〉闈㈡粴鍔ㄨВ鍐昌======= $(function ($) { var height = $(window).height() $(window).on('resize' , function () { if ($(window).height() < height) { $('.footer-nav').css('position' , 'static') }else { $('.footer-nav').css('position' , 'fixed') } }) })