/** * 校验内容 */ function prokeypress(type,textId,channelId){ var event = window.event || arguments.callee.caller.arguments[0]; if (event.keyCode == 13) { searchfun(type,textId,channelId); } } /** * 查找内容 * @param type */ function searchfun(type,textId,channelId){ if(!type){ type = "ap"; } if(!textId){ textId = "searchvalue"; } var hrefUrl = SYS_BASE + "/pcSearchQuery.jspx?t="+type; if(channelId){ if(channelId != '-1' || channelId!=-1){ hrefUrl += "&c="+channelId; } } var searchvalue = $("#"+textId).val(); if(!searchvalue || searchvalue==""){ return; //searchvalue = "德力西"; } if(searchvalue=='请输入产品关键字' || searchvalue.trim()=='请输入产品关键字'){ return; //searchvalue = "德力西"; } searchvalue = encodeURIComponent(searchvalue.trim()); window.location.href= hrefUrl +"&q="+searchvalue; } function browserRedirect() { var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp = sUserAgent.match(/midp/i) == "midp"; var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) { window.location.href = SYS_BASE + "/indexMobile.html" } else { } } //browserRedirect(); function onpressQueryDownloadSingletxt(channelId,baseurl){ var event = window.event || arguments.callee.caller.arguments[0]; if (event.keyCode == 13) { queryDownloadSingletxt(channelId,baseurl); } } function queryDownloadSingletxt(channelId,baseurl){ var attachname = $("#titlevalue").val(); $.ajax({ type: 'POST', url: SYS_BASE + "/queryProductFile.jspx", data: { channleId : channelId, isPro : 'N', attachname : attachname }, success: function(resp){ addDownloadSingleToList(resp,baseurl); }, dataType: 'json' }); } function addDownloadSingleToList(data,baseurl){ $("#downfilelist").empty(); var singleDiv = ""; var showname = null; var filesize = null; var filepath = null; for(var i=0;i'; singleDiv += ''+filesize+'  Mb'; singleDiv += '查  看'; singleDiv += ''; singleDiv +=''; singleDiv += ''; $("#downfilelist").append(singleDiv); } } /** * 产生验证码 */ function changeVerifyCode(codeImgId) { var obj = document.getElementById(codeImgId); if (obj) { obj.style.visibility = 'visible'; obj.src = '/captcha.svl?' + new Date().getTime(); } } /** * 提交表单 */ function submitForm(type,isPro,proType,proTypeName,proTypePath){ var selectFkType = ""; var userPhone = ""; var userName = ""; var companyPhone = $("#companyPhone").val(); var email = ""; if(isPro && isPro == 'Y'){//判断反馈类别 //获取选择的值 var selectFkType = $('#fktype option:selected').val(); if(!selectFkType || selectFkType==''){ alert("请选择反馈类别!"); return; } userName = $("#userName").val(); if(!userName || userName == ''){ alert("请输入您的姓名!"); return; } if(!companyPhone || companyPhone==''){ alert("请输入您的电话!"); return; } email = $("#companyEmail").val(); if(!email || email==''){ alert("请输入您的邮箱!"); return; } var mailRegx = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ ; var mailFlag = mailRegx.test(email); //邮箱验证 if (!mailFlag) { alert("邮箱格式不正确"); return; } }else{ userPhone = $("#userPhone").val(); if(!userPhone || userPhone == ''){ alert("请输入您的电话号码!"); return; } var remphone = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(19[0-9]{1}))+\d{8})$/ ; var phoneFlag = remphone.test(userPhone); //手机验证 if (!phoneFlag) { alert("手机号码格式不正确"); return; } } var companyName = $("#companyName").val(); if(!companyName || companyName==''){ alert("请输入你的公司名称或者联系姓名"); return; } var industry = $("#industry").val(); var feedBackContent = $("#feedBackContent").val(); var checkCode = $("#checkcode").val(); if(!checkCode || checkCode==''){ alert("验证码不能为空"); return; } var formData = { userName:userName, proType : proType, proTypeName : proTypeName, proTypePath:proTypePath, userPhone:userPhone, companyName:companyName, email : email, companyPhone:companyPhone, industry:industry, type:type, checkCode : checkCode, fkType : selectFkType, feedBackContent:feedBackContent } FEEDBACK_FUNC_JS.saveFeedBackInfo(formData); } /** * 提交表单 */ function submitCustForm(type){ var userPhone = $("#userPhone").val(); if(!userPhone || userPhone == ''){ alert("请输入您的电话号码!"); return; } var remphone = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(19[0-9]{1}))+\d{8})$/ ; var phoneFlag = remphone.test(userPhone); //手机验证 if (!phoneFlag) { alert("手机号码格式不正确"); return; } var userName = $("#userName").val(); if(!userName || userName==''){ alert("请输入你的联系姓名"); return; } var companyName = $("#companyName").val(); var city = $("#city").val(); var feedBackContent = $("#feedBackContent").val(); var checkCode = $("#checkcode").val(); if(!checkCode || checkCode==''){ alert("验证码不能为空"); return; } var formData = { userPhone:userPhone, companyName:companyName, userName:userName, city:city, type:type, checkCode : checkCode, feedBackContent:feedBackContent } FEEDBACK_FUNC_JS.saveFeedBackInfo(formData); } function updateAttachmentDownLoadCount(attachName,attachPath,atype){ $.ajax({ type: 'POST', url: "/updateDownLoadCount.jspx", data: { attachName : attachName, attachPath : attachPath, atype : atype }, success: function(resp){ } }); } function downLoadByName(attachName,attachPath,atype){ $.ajax({ type: 'POST', url: "/updateDownLoadCount.jspx", data: { attachName : attachName, attachPath : attachPath, atype : atype }, success: function(resp){ } }); if(attachPath && attachPath.indexOf("http")<0){ attachName = encodeURIComponent(attachName.trim()); if(atype == 1){ if(attachPath.indexOf(".pdf")>=0 || attachPath.indexOf(".PDF")>=0 ){ window.open("/downloadByName.jspx?isPreview=Y&filePath="+attachPath+"&fileName="+attachName+"&t=" + new Date()); }else{ window.open(attachPath); } }else{ //下载 window.open("/downloadByName.jspx?filePath="+attachPath+"&fileName="+attachName+"&t=" + new Date()); } } }