$('.sqty-tel').bind('input propertychange',function(){ $(this).val($(this).val().replace(/\D/g,'')); if($(this).val().length>11){ $(this).val($(this).val().slice(0,11)); return } }) $('#sqty-form-submit').click(function(){ if($('.sqty-tel').val() === 0){ alert('请填写手机号'); return; } if($('.sqty-tel').val().match(/^1[3-9]\d{9}$/)){ var cpord = $('.sqty-tel').attr("forProc"); var neword = "1"+ ("000"+cpord).slice(2)+"1"; saveFreeUse(neword, $('.sqty-tel').val(),$('.sqty-name').val(),$('.sqty-company').val(),$('.sqty-requirement').val(),"proTopMfty"); }else{ alert('请您正确填写手机号。'); return; } }) function afterFreeUseOk(ret, callType){ switch(callType){ case "proTopMfty": $('.sqty-name').val(''); $('.sqty-tel').val(''); $('.sqty-company').val(''); $('.sqty-requirement').val(''); alert(ret.replace("err:", "")); break; case "proBottomTelYue": $('.yuyue-tel-txt').val(""); alert(ret.replace("err:", "")); break; case "proHxgnDownloadFile": $(".form-verify-code").val(""); $('#downFile_name').val(""); $("#downFile_phone").val(""); $('#send').removeClass('active'); $('#send').unbind('click',sendMessage) $('.download-downbtn').removeClass('active'); $('.download-downbtn').unbind('click',downloadFile) $('.download-box').hide(); try{ clearInterval(timer) $('#send').text('发送验证码'); }catch(e){} if(window.downloadFileUrl!=""){ downloadTheFile(window.downloadFileUrl, window.downloadFileName); } break; } } function saveFreeUse(ad_from, fre_phone, fre_name, fre_company, fre_write, callType){ if(typeof(fre_name) == "undefined"){fre_name = "";} if(typeof(fre_company) == "undefined"){fre_company = "";} if(typeof(fre_write) == "undefined"){fre_write = "";} if(typeof(ad_from) == "undefined"){ad_from = "";} if(typeof(callType) == "undefined"){callType = "";} var fromType3 = ""; var fre_hcad = ""; if(fre_phone!=""){ if(ad_from.indexOf("|")>-1){ var arr_from = ad_from.split("|"); ad_from = arr_from[0]; fromType3 = arr_from[1]; } var _name="zb_bd_vid="; var _cv=""; var ca = document.cookie.split(';'); for(var i=0; i=menuLen){ menuIndex = 0; } nextMenu(); },5000) } setMenuTimer(); function nextMenu(){ $('.menu-ctx-item').eq(lastMenuIndex).addClass('left-out').removeClass('left-in right-in right-out'); $('.menu-ctx-item').eq(menuIndex).addClass('right-in').removeClass('left-in left-out right-out'); $('.menu-item').eq(menuIndex).addClass('active').siblings().removeClass('active'); } function prevMenu(){ $('.menu-ctx-item').eq(lastMenuIndex).addClass('right-out').removeClass('left-in right-in left-out'); $('.menu-ctx-item').eq(menuIndex).addClass('left-in').removeClass('right-in left-out right-out'); $('.menu-item').eq(menuIndex).addClass('active').siblings().removeClass('active'); } $('.menu-list').hover(function(){ clearInterval(window.menuTimer); },function(){ clearInterval(window.menuTimer); setMenuTimer(); }) $('.menu-item').hover(function(){ lastMenuIndex = menuIndex; menuIndex = $(this).index(); if(lastMenuIndex == menuIndex){ return; } if(menuIndex>lastMenuIndex){ nextMenu(); }else{ prevMenu(); } }) var caseIndex = 1; $('.tabs-menu-list').on('mouseenter', '.tabs-menu-item', function () { var i = $(this).index(); var classname = 'tabs-menu-list item-' + (i + 1); $('.tabs-menu-list').attr('class', classname); $('.tabs-ctx-item').eq(i).show().siblings().hide(); }) $('.case-tabs-item').click(function () { var i = $(this).index(); window.caseIndex = i; // if() $(this).addClass('active').siblings().removeClass('active'); $('.case-ctx-item').eq(i).show().siblings().hide(); var static_top = $('.tabs-static-ctx').offset().top; $(document).scrollTop(static_top); }) try { window.partner_timer = []; $('.partner-list').each(function (index, item) { $(item).append($(item).find('.partner-item').clone()) var len = $(item).find('.partner-item').length; var imgWidth = $(item).find('.partner-item').width() + 6; var width = imgWidth * len + 'px'; $(item).css('width', width); var timer = setInterval(function () { if (index % 2 == 0) { var left = $(item).offset().left - 1; if (left <= - $(item).width() / 2) { left = left + $(item).width() / 2; }; } else { var left = $(item).offset().left + ($(item).width() - $('.partner-box').width()) + 1; if (left >= $(item).width() / 2) { left = left - $(item).width() / 2; } } $(item).css('transform', 'translateX(' + left + 'px)'); }, 40) partner_timer.push(timer); }) $('.partner-box').hover(function () { for (var i = 0; i < partner_timer.length; i++) { clearInterval(partner_timer[i]); } }, function () { window.partner_timer = []; $('.partner-list').each(function (index, item) { var len = $(item).find('.partner-item').length; var imgWidth = $(item).find('.partner-item').width() + 6; var width = imgWidth * len + 'px'; $(item).css('width', width); var timer = setInterval(function () { if (index % 2 == 0) { var left = $(item).offset().left - 0.2; if (left <= - $(item).width() / 2) { left = left + $(item).width() / 2; }; } else { var left = $(item).offset().left + ($(item).width() - $('.partner-box').width()) + 0.2; if (left >= $(item).width() / 2) { left = left - $(item).width() / 2; } } $(item).css('transform', 'translateX(' + left + 'px)'); }, 16.7) partner_timer.push(timer); }) }) } catch (e) { alert(e) } $(document).scroll(function () { var static_top = 0; try{static_top = $('.tabs-static-ctx').offset().top;} catch(e){} if ($(document).scrollTop() > static_top && $(document).scrollTop()< static_top + $('.case-ctx').height()) { $('.tabs-ctx').css({ position: 'fixed', left: 0, top: 0 }) } else { $('.tabs-ctx').css({ position: 'relative', left: 0, top: 0 }) } if ($(document).scrollTop() > static_top+30 && $(document).scrollTop()< static_top + $('.case-ctx').height() - (586 + 98 + 30) && caseIndex == 1 ) { $('#fun_nav').css({ position:'fixed', top:98, left:$('.case-ctx-item0').offset().left, bottom: 'auto' }) } else { $('#fun_nav').css({ position: 'absolute', left: 0, top: 0, bottom: 0 }) } }) $(window).resize(function(){ if(caseIndex != 1){ return; } if(window.resetFunNavLeft){ clearTimeout(window.resetFunNavLeft) } window.resetFunNavLeft = setTimeout(function(){ var left = 0; try{ var static_top = $('.tabs-static-ctx').offset().top; if($(document).scrollTop() > static_top+30 && $(document).scrollTop()< static_top + $('.case-ctx').height() - (586 + 98)){ left = $('.case-ctx-item0').offset().left; } }catch(e){} $('#fun_nav').css({ left:left }) },20) }) $('.down-pro').click(function(){ window.downloadFileUrl = $(this).attr('dUrl') var dfileName = $(this).html(); window.downloadFileName = transFileName(dfileName); window.downloadFileType = $(this).attr('dftype'); $(".form-verify-code").attr("chkCode",""); $('.download-box').attr("downAct","downFile3"); $('.download-box').show(); }) $('.down-tec').click(function(){ window.downloadFileUrl = $(this).attr('dUrl') var dfileName = $(this).html(); window.downloadFileName = transFileName(dfileName); window.downloadFileType = $(this).attr('dftype'); $(".form-verify-code").attr("chkCode",""); $('.download-box').attr("downAct","downFile4"); $('.download-box').show(); }) $('.szh-download').click(function(){ window.downloadFileUrl = $(this).attr('dUrl') var dfileName = $(this).attr('dfname'); window.downloadFileName = transFileName(dfileName); window.downloadFileType = $(this).attr('dftype'); $(".form-verify-code").attr("chkCode",""); $('.download-box').attr("downAct","downFile7"); $('.download-box').show(); }) function transFileName(dfileName){ var dfname = dfileName; if(dfileName.indexOf("《")>-1 || dfileName.indexOf("》")>-1){ dfname = dfileName.split("《")[1]; dfname = dfname.split("》")[0]; } return dfname; } $('#fun_nav_ul li').click(function(){ var i = $(this).index(); $(this).addClass('bg').siblings().removeClass('bg'); $('.fun_nav_div').eq(i).addClass('fun_nav_div_bg').siblings().removeClass('fun_nav_div_bg') }) //$('.fun_nav_div li').click(function(){ // var navid1 = $(this).parent().attr("nav"); // var navid2 = $(this).attr("nav"); // var url = '/product-center/coreHtmls/introduction_erp_'+ navid1 +'_'+ navid2 +'.html'; // $.ajax({ // url:url, // cache:false, // success:function(r){ // if(r!=""){ // $("#coreshow").html(""); // $("#coreshow").html(r); // } // } // }); //}) $('#downFile_phone').bind('input propertychange',function(){ $(this).val($(this).val().replace(/\D/g,'')); if($(this).val().length>11){ $(this).val($(this).val().slice(0,11)); return } if($(this).val().match(/^1[3-9]\d{9}$/)){ $('#send').addClass('active'); $('#send').bind('click',sendMessage) }else{ $('#send').removeClass('active'); $('#send').unbind('click',sendMessage) } }) $('.form-verify-code').bind('input propertychange',function(){ $(this).val($(this).val().replace(/\D/g,'')); if($(this).val().length>6){ $(this).val($(this).val().slice(0,6)); return } if($(this).val().match(/^\d{6}$/)){ $('.download-downbtn').addClass('active'); $('.download-downbtn').bind('click',downloadFile) }else{ $('.download-downbtn').removeClass('active'); $('.download-downbtn').unbind('click',downloadFile) } }) $('.download-close-btn').click(function(){ $('.form-tel').val(''); $('.form-verify-code').val(''); $('.download-downbtn').removeClass('active'); $('#send').removeClass('active'); $('.download-box').hide(); $('.download-tips').hide(); }) function sendMessage(){ //console.log('这里做发送验证码的操作'); $.ajax({ url:"../service-center/ajaxResult.asp?msgid=sendSmsVerifyCode" , data:{"mobile":$("#downFile_phone").val()}, cache:false, type:'post', success:function(r){ if(r.indexOf("OK!")>-1){ $('#send').removeClass('active'); $('#send').unbind('click',sendMessage); $(".form-verify-code").attr("chkCode", r.replace("OK!","")) var s = 60; $('#send').text(s+'s'); window.timer = setInterval(function(){ s--; if(s>0){ $('#send').text(s+'s'); }else{ clearInterval(timer) $('#send').text('发送验证码'); if($('#downFile_phone').val().match(/^1[3-9]\d{9}$/)){ $('#send').addClass('active'); $('#send').bind('click',sendMessage) } } },1000) }else{ alert("发送失败,请联系亚洲bet356体育唯一"); } } }); } function downloadFile(){ //console.log('这里做下载文件的操作'); var chkCode = $(".form-verify-code").attr("chkCode"); var verCode = $(".form-verify-code").val(); if(verCode == ""){ alert("请输入短信验证码"); return; } if(chkCode == verCode){ var cpord = "0"; if($('.case-download-btns').size()>0){ cpord = $('.case-download-btns').attr("forProc"); }else if($('.szh-list').size()>0){ cpord = $('.szh-list').attr("forProc"); } var neword = "1"+ ("000"+cpord).slice(2)+$('.download-box').attr("downAct").replace("downFile",""); var dftype = window.downloadFileType; neword = neword + "|"+ dftype; saveFreeUse(neword, $('#downFile_phone').val(),$('#downFile_name').val(),"","","proHxgnDownloadFile"); }else{ alert("您输入的验证码不正确或已过期,请重试"); return; } //$('.download-tips').show(); } function downloadTheFile(url, dfname) { try { if(typeof(dfname) == "undefined"){dfname = "";} var elemIF = document.createElement("iframe"); var downurl = url.replace("../../","../"); var downHref = downurl; if(dfname!=""){ downHref = "../service-center/DownFile.ashx?filepath="+ downurl + "&filename=" + escape("亚洲bet356体育唯一"+dfname); } elemIF.src = downHref; elemIF.style.display = "none"; document.body.appendChild(elemIF); } catch (e) { alert("下载失败,请联系值班国际"); } } //左侧导航切换 function leftNav(){ var oBox = $('#fun_nav'); var aLi = oBox.find('#fun_nav_ul li'); var aDiv = oBox.find('.fun_nav_div'); var oLi=$('.fun_nav_div>ul>li'); var aUl=$('.fun_nav_divs'); var conDiv=$('.fun_nav_divs'); var conDivTop=0; try{conDivTop = conDiv.offset().top-102;}catch(e){} aLi.click(function(){ var index = $(this).index(); // $(window).scrollTop(conDivTop); $(this).addClass('bg').siblings().removeClass('bg'); aDiv.eq(index).show().siblings('.fun_nav_div').hide(); aUl.eq(index).addClass("bg").siblings().removeClass('bg'); }); oLi.click(function () { var changeLi=$('.fun_nav_divs.clear.bg li'); var index=$(this).index(); var faIndex=$(this).parent().parent().index(); changeLi.eq(index).addClass('bg').siblings().removeClass('bg'); $(window).scrollTop(conDivTop); try{coreLiChg($(this));}catch(e){} }) } leftNav(); function prowid() {//控制宽度(有的内容有多有少); //控制大箭头处的内容宽度; var p=$('#row p'); var widt=$('#row').outerWidth(); var par=p.parent(); var pWidth=par.outerWidth(); //console.log(p); p.each(function (i) { $(p[i]).css({width:widt/p.length-p.length}); //console.log($(p[i]).outerWidth()); $(p[0]).css({'border':'none'}); par.css({width:$(p[i]).outerWidth()*p.length+p.length}); }); //控制大箭头下方的内容宽度 var col=$('.col'); col.each(function (i) { $(col[i]).css({width:col.parent().outerWidth()/col.length-0.5}) }); //控制产品优势的宽度 var li=$('.module_sixt .box li'); li.each(function (i) { $(li[i]).css({width:li.parent().outerWidth()/li.length}) }); //控制软件应用价值的宽度 try{ var softLi=$('.goods_tedi .box li'); softLi.each(function (i) { $(softLi[i]).css({width:softLi.parent().outerWidth()/softLi.length}) }); }catch(e){} } prowid();