$(function () { if (isIE()) { 聽 聽 聽 聽 var aList = $("a"); 聽 聽 聽 聽 aList.each(function () { 聽 聽 聽 聽 聽 var str = "file="; 聽 聽 聽 聽 聽 var href = $(this).attr("href"); 聽 聽 聽 聽 聽 if (href) { 聽 聽 聽 聽 聽 聽 var fileIndex = href.indexOf(str); 聽 聽 聽 聽 聽 聽 if (fileIndex !== -1) { 聽 聽 聽 聽 聽 聽 聽 $(this).attr("href", href.substring(fileIndex + str.length)); 聽 聽 聽 聽 聽 聽 } 聽 聽 聽 聽 聽 } 聽 聽 聽 聽 }); 聽 聽 聽 } 聽 聽 聽 // 妫€娴嬫槸鍚︿负IE娴忚鍣 聽 聽 聽 function isIE() { 聽 聽 聽 聽 const ua = window.navigator.userAgent; 聽 聽 聽 聽 const msie = ua.indexOf("MSIE "); // IE 10 鎴栨洿鏃╃殑鐗堟湰 聽 聽 聽 聽 const trident = ua.indexOf("Trident/"); // IE 11 聽 聽 聽 聽 return msie > 0 || trident > 0; 聽 聽 聽 } //娑堥櫎鎽樿閲岀殑绌烘牸 $(".news_con .txt").each(function() { 聽 var html = $(this).html(); 聽 html = html.replace(/^(\s|聽)+|(\s|聽)+$/g, ''); 聽 $(this).html(html); }) //瀛愭爮鐩互鍙婅鎯呴〉鑾峰彇banner var gps=$('.ser_nav span a').eq(1).attr('href') $('#banner').load(gps+' .banner') //鍙湁涓€椤垫椂涓嶅睍绀哄垎椤 var pagelength= $( "input[name='article_paging_list_hidden']") .attr("totalpage") if(pagelength >1){ $(".newsul_pag").show() }else{ $(".newsul_pag").hide() } // 棣栭〉 if (typeof (Swiper) != 'undefined' && $('.swiper-container_index')){ var imgNumber = $(".swiper-container_index .swiper-slide").length; // 鑾峰彇婊戝潡褰撳墠鍥剧墖鏁伴噺 if (imgNumber > 1) { console.log(imgNumber) // 婊氬姩鏁堟灉 var swiper1 = new Swiper('.swiper-container_index', { autoplay: { delay: 3000, disableOnInteraction: false, }, loop: true, effect: 'fade', pagination: { el: '.swiper-pagination', type: 'custom', renderCustom: function (swiper, current, total) { return '' + (current > 9 ? current : '0' + current) + '' + ' / ' + '' + (total > 9 ? total : '0' + total) + ''; } }, }); } else { var swiper1 = new Swiper('.swiper-container_index', { autoplay: 3000, paginationClickable: true, autoplayDisableOnInteraction: false, // 鑻ュ彧鏈変竴涓殑鏃跺€欎笉璁╁乏鍙冲垏鎹紝灏卞皢loop鐨勫€煎彉涓篺alse,鑻ュ涓渶瑕佸惊鐜€间负锛歵rue, loop: false, pagination: { el: '.swiper-pagination', type: 'custom', renderCustom: function (swiper, current, total) { return '' + (current > 9 ? current : '0' + current) + '' + ' / ' + '' + (total > 9 ? total : '0' + total) + ''; } }, }); } } if (typeof (Swiper) != 'undefined' && $('.swiper-container_ywly')){ var swiper2 = new Swiper('.swiper-container_ywly', { autoplay:{ delay: 5000, disableOnInteraction: false, }, loop: true, pagination: { el: '.swiper-pagination', type: 'custom', renderCustom: function (swiper, current, total) { return '' + (current > 9 ? current: '0'+current) + ''+' / ' +'' + (total > 9 ? total: '0' +total) + ''; } }, }); } //涓存椂鍏憡 if (typeof (Swiper) != 'undefined' && $('#swiper_gg')){ var swiper_gg = new Swiper('#swiper_gg', { loop: true, //鍏佽浠庣涓€寮犲埌鏈€鍚庝竴寮狅紝鎴栬€呬粠鏈€鍚庝竴寮犲埌绗竴寮 寰幆灞炴€ slidesPerView: 2, // 璁剧疆鏄剧ず涓夊紶 freeMode: true, // 浣垮够鐏墖婊戝姩鏃朵笉姝㈡粦鍔ㄤ竴鏍硷紝涓斾笉浼氳嚜鍔ㄨ创鍚 slidesPerGroup: 1, //瀹氫箟1寮犲浘鐗囦负涓€缁 autoplay: true, //鍙€夐€夐」锛岃嚜鍔ㄦ粦鍔 direction: 'vertical', autoplay: { delay: 3000, disableOnInteraction: true, stopOnListSlide: true, autoplayDisableOnInteraction: false, }, }); $('#swiper_gg').mouseenter(function () { swiper_gg.autoplay.stop(); }) // // 榧犳爣绉诲嚭寮€濮嬭嚜鍔ㄦ粴鍔 $('#swiper_gg').mouseleave(function () { swiper_gg.autoplay.start(); }) } if (typeof (Swiper) != 'undefined' && $('#swiper_gg1')){ var swiper_gg1 = new Swiper('#swiper_gg1', { loop: true, //鍏佽浠庣涓€寮犲埌鏈€鍚庝竴寮狅紝鎴栬€呬粠鏈€鍚庝竴寮犲埌绗竴寮 寰幆灞炴€ slidesPerView: 2, // 璁剧疆鏄剧ず涓夊紶 freeMode: true, // 浣垮够鐏墖婊戝姩鏃朵笉姝㈡粦鍔ㄤ竴鏍硷紝涓斾笉浼氳嚜鍔ㄨ创鍚 slidesPerGroup: 1, //瀹氫箟1寮犲浘鐗囦负涓€缁 autoplay: true, //鍙€夐€夐」锛岃嚜鍔ㄦ粦鍔 direction: 'vertical', autoplay: { delay: 3000, disableOnInteraction: true, stopOnListSlide: true, autoplayDisableOnInteraction: false, }, }); $('#swiper_gg1').mouseenter(function () { swiper_gg1.autoplay.stop(); }) // // 榧犳爣绉诲嚭寮€濮嬭嚜鍔ㄦ粴鍔 $('#swiper_gg1').mouseleave(function () { swiper_gg1.autoplay.start(); }) } // 绀句細璐d换 if (typeof (Swiper) != 'undefined' && $('.s_rswiper11')){ var s_rswiper11 = new Swiper('.s_rswiper11', { autoplay:{ delay: 3000, disableOnInteraction: false, }, loop: true, pagination: { el: '.s_rpag1', clickable: true, } }) } // 鍙戝睍鍘嗙▼ if (typeof (Swiper) != 'undefined' && $('.fzlc_s')){ var swiper3 = new Swiper('.fzlc_s', { autoplay:{ delay: 3000, disableOnInteraction: false, }, loop: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }); $('.fzlc_s').mouseenter(function () { swiper3.autoplay.stop(); }) // // 榧犳爣绉诲嚭寮€濮嬭嚜鍔ㄦ粴鍔 $('.fzlc_s').mouseleave(function () { swiper3.autoplay.start(); }) } // 鎷涙爣鎷涚 if (typeof (Swiper) != 'undefined' && $('#swiper_zbzz')){ var swiper4 = new Swiper('#swiper_zbzz', { loop: true, //鍏佽浠庣涓€寮犲埌鏈€鍚庝竴寮狅紝鎴栬€呬粠鏈€鍚庝竴寮犲埌绗竴寮 寰幆灞炴€ slidesPerView: 5, // 璁剧疆鏄剧ず涓夊紶 //centeredSlides : true, //浣垮綋鍓嶅浘鐗囧眳涓樉绀 freeMode: true, // 浣垮够鐏墖婊戝姩鏃朵笉姝㈡粦鍔ㄤ竴鏍硷紝涓斾笉浼氳嚜鍔ㄨ创鍚 slidesPerGroup: 1, //瀹氫箟1寮犲浘鐗囦负涓€缁 autoplay: true, //鍙€夐€夐」锛岃嚜鍔ㄦ粦鍔 // speed: 3000, //璁剧疆杩囧害鏃堕棿 grabCursor: true, //榧犳爣鏍峰紡鏍规嵁娴忚鍣ㄤ笉鍚岃€屽畾 direction: 'vertical', autoplay: { delay: 2000, disableOnInteraction: true, stopOnListSlide: true, autoplayDisableOnInteraction: false, }, }); $('#swiper_zbzz').mouseenter(function () { swiper4.autoplay.stop(); }) // // 榧犳爣绉诲嚭寮€濮嬭嚜鍔ㄦ粴鍔 $('#swiper_zbzz').mouseleave(function () { swiper4.autoplay.start(); }) } //if (typeof (Swiper) != 'undefined' && $('#swiper_zbzz2')){ var swiper5 = new Swiper('#swiper_zbzz2', { loop: true, //鍏佽浠庣涓€寮犲埌鏈€鍚庝竴寮狅紝鎴栬€呬粠鏈€鍚庝竴寮犲埌绗竴寮 寰幆灞炴€ slidesPerView: 5, // 璁剧疆鏄剧ず涓夊紶 //centeredSlides : true, //浣垮綋鍓嶅浘鐗囧眳涓樉绀 freeMode: true, // 浣垮够鐏墖婊戝姩鏃朵笉姝㈡粦鍔ㄤ竴鏍硷紝涓斾笉浼氳嚜鍔ㄨ创鍚 slidesPerGroup: 1, //瀹氫箟1寮犲浘鐗囦负涓€缁 autoplay: true, //鍙€夐€夐」锛岃嚜鍔ㄦ粦鍔 // speed: 3000, //璁剧疆杩囧害鏃堕棿 grabCursor: true, //榧犳爣鏍峰紡鏍规嵁娴忚鍣ㄤ笉鍚岃€屽畾 direction: 'vertical', autoplay: { delay: 2000, disableOnInteraction: true, stopOnListSlide: true, autoplayDisableOnInteraction: false, }, }); $('#swiper_zbzz2').mouseenter(function () { swiper5.autoplay.stop(); }) // // 榧犳爣绉诲嚭寮€濮嬭嚜鍔ㄦ粴鍔 $('#swiper_zbzz2').mouseleave(function () { swiper5.autoplay.start(); }) //} $(window).scroll(function () { var $top = $(window).scrollTop(); var $box = $('.header'); var $index_banner = $('.index_banner') if ($top > 0) { $box.addClass('scrollTop') $index_banner.addClass('top74') } else { $box.removeClass('scrollTop') $index_banner.removeClass('top74') } }); // 鎵嬫満绔鑸 $(".nav_btn").click(function () { $(".nav_btn").toggleClass("nav_btn_open"); $(".mobile-nav-box").toggleClass("mobile-nav-box-show"); // $(".wrapper").toggleClass("wrapper-after-show"); $(".boxmask").toggleClass("maskshow"); }) $(".mobile-menu-nav ul li .tit").click(function () { $(this).children("i").toggleClass("icon-angle-down").toggleClass("icon-angle-up").parents("li").siblings().find("i").removeClass("icon-angle-up").addClass("icon-angle-down"); $(this).next(".mobile-second-nav").slideToggle().parent().siblings().find(".mobile-second-nav").slideUp(); $(this).toggleClass("chose").parent().siblings().find(".tit").removeClass("chose"); }) // 瑙嗛闅愯棌 /*var videosrc = $(".sec4_l_video .mask video").attr("src") $(".mask_con .close").click(function () { $(".sec4_l_video .mask").hide() $(".sec4_l_video .mask video").attr("src", "") }) $(".sec4_l_video .play").click(function () { $(".sec4_l_video .mask").show() $(".sec4_l_video .mask video").attr("src", videosrc) })*/ var videosrc = $(".sec4_l_video .mask video").data("src") $(".mask_con .close").click(function () { $(".sec4_l_video .mask").hide() $(".sec4_l_video .mask video").attr("src", "") }) $(".sec4_l_video .play").click(function () { $(".sec4_l_video .mask").show() $(".sec4_l_video .mask video").attr("src", videosrc) }) //$('#video).bind('contextmenu',function() { return false; }); // 楠岃瘉鐮 //椤甸潰鍔犺浇鏃讹紝鐢熸垚闅忔満楠岃瘉鐮 // window.onload = function () { // createCode(4); // } createCode(4); //鐢熸垚楠岃瘉鐮佺殑鏂规硶 function createCode(length) { var code = ""; var codeLength = parseInt(length); //楠岃瘉鐮佺殑闀垮害 var checkCode = document.getElementById("checkCode"); // 鎵€鏈夊€欓€夌粍鎴愰獙璇佺爜鐨勫瓧绗︼紝褰撶劧涔熷彲浠ョ敤涓枃鐨 var codeChars = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); //寰幆缁勬垚楠岃瘉鐮佺殑瀛楃涓 for (var i = 0; i < codeLength; i++) { //鑾峰彇闅忔満楠岃瘉鐮佷笅鏍 var charNum = Math.floor(Math.random() * 62); //缁勫悎鎴愭寚瀹氬瓧绗﹂獙璇佺爜 code += codeChars[charNum]; } if (checkCode) { //涓洪獙璇佺爜鍖哄煙娣诲姞鏍峰紡鍚 checkCode.className = "code"; //灏嗙敓鎴愰獙璇佺爜璧嬪€煎埌鏄剧ず鍖 checkCode.innerHTML = code; } } //妫€鏌ラ獙璇佺爜鏄惁姝g‘ function validateCode() { //鑾峰彇鏄剧ず鍖虹敓鎴愮殑楠岃瘉鐮 var checkCode = document.getElementById("checkCode").innerHTML; //鑾峰彇杈撳叆鐨勯獙璇佺爜 var inputCode = document.getElementById("inputCode").value; console.log(checkCode); console.log(inputCode); if (inputCode.length <= 0) { alert("璇疯緭鍏ラ獙璇佺爜锛?); } else if (inputCode.toUpperCase() != checkCode.toUpperCase()) { alert("楠岃瘉鐮佽緭鍏ユ湁璇紒"); createCode(4); } else { alert("楠岃瘉鐮佹纭?); } } function submit() { var gsname = $("#gsname").val() var title = $("#per").val() var textarea = $("#area").val() var tel = $("#tel").val() var inputCode = $("#inputCode").val() var myreg = /^[1][3,4,5,7,8][0-9]{9}$/; console.log(gsname); if(gsname.length == 0){ $('