basePath= ''; $(function () { if (window.innerWidth > 1024) { new WOW().init(); } $(".nav ul.nav-wapper li").hover(function(){ $(this).siblings().find('.subnav').hide(); $(this).find('.subnav').show(); },function(){ $(this).find('.subnav').hide(); $("header ul.nav-header a.activ").parent().find('.navbox').show(); }) var banSwiper = new Swiper('.banner .swiper-container', { effect: "fade", fade: { crossFade: true }, loop: true, autoplay: 3000, pagination: '.banner-btns .pagination-box-view', paginationClickable: true, autoplayDisableOnInteraction: false, observer: true, onInit: function (swiper) { if (window.innerWidth > 1024) { swiperAnimateCache(swiper); swiperAnimate(swiper); } }, onSlideChangeEnd: function (swiper) { if (window.innerWidth > 1024) { swiperAnimate(swiper); } } }) $('#big_font').click(function () { $(this).addClass("navClicked").siblings().removeClass("navClicked"); $('.page_newsDetail_body').css({ 'font-size': '22px' }); }); $('#mid_font').click(function () { $(this).addClass("navClicked").siblings().removeClass("navClicked"); $('.page_newsDetail_body').css({ 'font-size': '18px' }); }); $('#sma_font').click(function () { $(this).addClass("navClicked").siblings().removeClass("navClicked"); $('.page_newsDetail_body').css({ 'font-size': '14px' }); }); var banLen = $('.banner .swiper-slide').length / 3; if (banLen == 1) { $('.banner .btns .view').hide(); $('.banner .swiper-button-white').hide(); banSwiper.stopAutoplay(); } var newsRotationSwiper = new Swiper('.swiper-news-rotation', { autoplay: 5000, loop: true, slidesPerView: 4, spaceBetween: 30, prevButton: '.swiper-button-prev', nextButton: '.swiper-button-next', }) var thumbNewsSwiper = new Swiper('.mod_news-thumbnews .swiper-container', { pagination: '.mod_news-thumbnews .btns-box', slidesPerView: 1, paginationClickable: true, observer: true, loop: true, autoplay: 4000, autoplayDisableOnInteraction: false, effect: 'fade', prevButton: ".mod_news-thumbnews .swiper-button-prev", nextButton: ".mod_news-thumbnews .swiper-button-next", onSlideChangeStart: function (swiper) { nextSlide = swiper.slides.eq(swiper.activeIndex); }, onSlideChangeEnd: function (swiper) { prevSlide = swiper.slides[swiper.previousIndex]; prevSlide.className = "swiper-slide"; }, }); var flinkSwiper2 = new Swiper('.mod_flink .js2', { pagination: '.mod_flink-btns-box', slidesPerView: 8, slidesPerGroup: 8, paginationClickable: true, observer: true, spaceBetween: 20, prevButton: ".mod_flink .prev", nextButton: ".mod_flink .next", breakpoints: { 1200: { slidesPerView: 8, slidesPerGroup: 8, } } }); jQuery(".mod_pics").slide({titCell:".tab-hd a", mainCell:".tab-bd", titOnClassName: "active"}); jQuery(".js-leftMarquee").slide({mainCell:"ul.list-pic",autoPlay:true,effect:"leftMarquee",vis:5,interTime:40,trigger:"click"}); var scrollTop = $(".scroll-to-top"); scrollTop.on('click', function () { $("html, body").animate({ scrollTop: 0 }, 300); return false; }) $(window).bind("scroll", function () { var scroll = $(window).scrollTop(); if (scroll > 200) { scrollTop.stop().fadeIn(300); } else { scrollTop.stop().fadeOut(300); } }); $(".mod_flink a").click(function (e) { var url = $(this).attr("href"); // if(!IsURL(url)){ var type = $(this).attr('data-type'); if(type == ''){ return true; } e.preventDefault(); if ($(this).attr('load') == 1) { return false; } $(this).attr('load', '1'); var c = $(this).find(".mod_flink-text").html(); $(this).find(".mod_flink-text").html('') NetPing(url, $(this).find(".mod_flink-text"), c, type); // } }); if($(".serviceList_ul").length > 0){ $(".serviceList_ul a").click(function (e) { var url = $(this).attr("href"); // if(!IsURL(url)){ var type = $(this).attr('data-type'); if(type == ''){ return true; } e.preventDefault(); if ($(this).attr('load') == 1) { return false; } $(this).attr('load', '1'); var c = $(this).find(".mod_flink-text").html(); $(this).find(".mod_flink-text").html('') NetPing(url, $(this).find(".mod_flink-text"), c, type); // } }) } }) function NetPing(pingUrl, target, con , type) { type = type || 'intranet'; let url = '//19.168.23.40:8926/seeyon/main.do'; if(pingUrl == '' || pingUrl == 'javascript:void(0)'){ target.parent().attr('load', 0); target.html(con); $("#popText").html('鎮ㄦ病鏈夋潈闄愭垨鑰呴渶瑕佸垏鎹㈣嚦鍐呯綉鐧诲綍'); layer.open({ type: 1, title: false, closeBtn: 0, shadeClose: true, skin: 'pop-error', content: $('.error-box'), }); return false; } $.ajax({ type: "GET", cache: false, url: url, dataType: "jsonp", processData: false, timeout: 3000, complete: function (data,TS) { if(type == 'extranet'){ if (data.status == 200) { $("#popText").html('璇锋鏌ユ偍鐨勭綉缁滄垨鍒囨崲鑷冲缃戣闂?); layer.open({ type: 1, title: false, closeBtn: 0, shadeClose: true, skin: 'pop-error', content: $('.error-box'), }); }else{ window.open(pingUrl); } }else if(type == 'intranet') { if (data.status == 200) { window.open(pingUrl); }else{ $("#popText").html('鎮ㄦ病鏈夋潈闄愭垨鑰呴渶瑕佸垏鎹㈣嚦鍐呯綉鐧诲綍'); layer.open({ type: 1, title: false, closeBtn: 0, shadeClose: true, skin: 'pop-error', content: $('.error-box'), }); } }else{ window.open(pingUrl); } target.parent().attr('load', 0) target.html(con) } }); } function promiseUtil(url) { return new Promise((resolve, reject) => { $.ajax({ type: "GET", cache: false, url: url, dataType: "jsonp", processData: false, timeout: 3000, complete: function (data,TS) { if (data.status >= 200 && data.status < 400) { resolve({ sucesss: true, message: '鎴愬姛', url: url, }) } else { reject({ sucesss: false, message: '澶辫触', url: url }) } } }); }); } function IsURL(str_url){ var strRegex = '([0-9]{1,3}.){3}[0-9]{1,3}'; var re=new RegExp(strRegex); if (!re.test(str_url)){ return (true); }else{ return (false); } } function encodeData(data) { temp = data; return temp } function replaceAll(targetStr, oldStr, newStr) { var endStr = targetStr; var index = targetStr.indexOf( oldStr ); var i = 0; while( index != -1 ) { endStr = endStr.replace(oldStr, newStr); index = endStr.indexOf(oldStr, index+1); } return endStr; } function search(key, type) { var searchKey = key || ''; var type = type || 'all' if(searchKey == '') { window.location = "/search.thtml"; } else { searchKey = encodeData(searchKey); searchKey= encodeURI(encodeURIComponent(searchKey)); window.location = "/search.thtml?keyword="+searchKey+"&type="+type; } } function changeCode() { $('#checkCodeImg').attr('src',basePath+'common/authImg.do?count=4&line=2&point=160&width=90&height=24&jump=4&ra='+Math.random()); } function submitGBInfo(){ var text = ''; text = document.getElementById('gbMan'); if(text.value.length < 2) { alert("璇疯緭鍏ユ纭鍚嶄俊鎭紒"); return; } text = document.getElementById('gbTitle'); if(text.value.length < 5) { alert("璇疯緭鍏ヤ笉灏?瀛楃殑鐣欒█鏍囬锛?); return; } text = document.getElementById('gbText'); if(text.value.length < 20) { alert("鎮ㄨ緭鍏ョ殑鐣欒█鏂囨湰瀛楁暟杩囧皯锛?); return; } else if(text.value.length > 2500) { alert("鎮ㄨ緭鍏ョ殑鐣欒█鏂囨湰瀛楁暟瓒呰繃2500瀛楋紒"); return; } text = document.getElementById('sysCheckCode'); if(text.value.length < 4) { alert("璇疯緭鍏ユ纭獙璇佺爜锛?); return; } var url = basePath+'guestbook/clientAddGb.do'; var postData = encodeURI($("#gbForm").serialize()) ; postData = postData.replace(/\+/g, " "); postData = encodeData(postData); $.ajax({ type: "POST", url: url, async : false, data:postData, dataType:'json', success: function(msg) { if('1' == msg) { alert('鎮ㄧ殑鐣欒█鎴愬姛,璇风瓑寰呯鐞嗗憳澶勭悊!'); window.location.reload(); } else if('-1' == msg) { alert('绯荤粺寮傚父,鐣欒█澶辫触!'); } else if('-2' == msg) { alert('鐣欒█浜哄鍚嶄笉鍙负绌?'); } else if('-3' == msg) { alert('楠岃瘉鐮侀敊璇?'); } else if('-4' == msg) { alert('鐣欒█鏍囬涓嶅厑璁镐负绌?'); } } }); } (function(){var a,b,c,d,e,f,g,h,i,j;b=window.device,a={},window.device=a,d=window.document.documentElement,j=window.navigator.userAgent.toLowerCase(),a.ios=function(){return a.iphone()||a.ipod()||a.ipad()},a.iphone=function(){return!a.windows()&&e("iphone")},a.ipod=function(){return e("ipod")},a.ipad=function(){return e("ipad")},a.android=function(){return!a.windows()&&e("android")},a.androidPhone=function(){return a.android()&&e("mobile")},a.androidTablet=function(){return a.android()&&!e("mobile")},a.blackberry=function(){return e("blackberry")||e("bb10")||e("rim")},a.blackberryPhone=function(){return a.blackberry()&&!e("tablet")},a.blackberryTablet=function(){return a.blackberry()&&e("tablet")},a.windows=function(){return e("windows")},a.windowsPhone=function(){return a.windows()&&e("phone")},a.windowsTablet=function(){return a.windows()&&e("touch")&&!a.windowsPhone()},a.fxos=function(){return(e("(mobile;")||e("(tablet;"))&&e("; rv:")},a.fxosPhone=function(){return a.fxos()&&e("mobile")},a.fxosTablet=function(){return a.fxos()&&e("tablet")},a.meego=function(){return e("meego")},a.cordova=function(){return window.cordova&&"file:"===location.protocol},a.nodeWebkit=function(){return"object"==typeof window.process},a.mobile=function(){return a.androidPhone()||a.iphone()||a.ipod()||a.windowsPhone()||a.blackberryPhone()||a.fxosPhone()||a.meego()},a.tablet=function(){return a.ipad()||a.androidTablet()||a.blackberryTablet()||a.windowsTablet()||a.fxosTablet()},a.desktop=function(){return!a.tablet()&&!a.mobile()},a.television=function(){var a;for(television=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","roku","pov_tv","hbbtv","ce-html"],a=0;a1},a.landscape=function(){return window.innerHeight/window.innerWidth<1},a.noConflict=function(){return window.device=b,this},e=function(a){return-1!==j.indexOf(a)},g=function(a){var b;return b=new RegExp(a,"i"),d.className.match(b)},c=function(a){var b=null;g(a)||(b=d.className.replace(/^\s+|\s+$/g,""),d.className=b+" "+a)},i=function(a){g(a)&&(d.className=d.className.replace(" "+a,""))},a.ios()?a.ipad()?c("ios ipad tablet"):a.iphone()?c("ios iphone mobile"):a.ipod()&&c("ios ipod mobile"):a.android()?c(a.androidTablet()?"android tablet":"android mobile"):a.blackberry()?c(a.blackberryTablet()?"blackberry tablet":"blackberry mobile"):a.windows()?c(a.windowsTablet()?"windows tablet":a.windowsPhone()?"windows mobile":"desktop"):a.fxos()?c(a.fxosTablet()?"fxos tablet":"fxos mobile"):a.meego()?c("meego mobile"):a.nodeWebkit()?c("node-webkit"):a.television()?c("television"):a.desktop()&&c("desktop"),a.cordova()&&c("cordova"),f=function(){a.landscape()?(i("portrait"),c("landscape")):(i("landscape"),c("portrait"))},h=Object.prototype.hasOwnProperty.call(window,"onorientationchange")?"orientationchange":"resize",window.addEventListener?window.addEventListener(h,f,!1):window.attachEvent?window.attachEvent(h,f):window[h]=f,f(),"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?module.exports=a:window.device=a}).call(this); href = window.location.href; $(function(){ var mob = $("body").attr("data-mob"); if(device.mobile()){ if(mob == '3'){ if(window.location.pathname == '/'){ window.location.href = "/mob_index.html"; }else{ att = href.split("/") if(href.indexOf('.thtml') != -1){ att[att.length - 1] = "mob/"+ att[att.length - 1]; }else{ att[att.length - 1] = "mob_"+ att[att.length - 1]; } href =att.join('/'); window.location.href=href; } }else{ var pathname = window.location.pathname ; window.location.href="/mob/" + pathname.substr(1) + window.location.search; } } })