>

portal html css js resource

invite-friends.js 4.7KB

    /*邀请好友*/ $(function(){ var phoneCode = false; var ifCode = false; var ifpassword = false; var state; var inviterId = GetQueryString("professorId"); var username = GetQueryString("professorName"); //var inviterId="6E199CFA7B034D69A7029731B6E77D4A"; //var username="特朗普"; $(".inviteTit span").text(username); /*控制提示框样式*/ function bombox(textt){ $(".bomb-box").fadeIn("slow"); $(".bomb-box").text(textt); var bombwidth = $(".bomb-box").width(); $(".bomb-box").css({"marginLeft": -(bombwidth+25)/2 + "px"}); setInterval (function(){ $(".bomb-box").fadeOut("slow"); },4000); } /*校验提交按钮显示状态*/ $('.form-group').on('keyup', "#userphone,#code,#password", function() { if($("#userphone").val() == "" || $("#code").val() == "" || $("#password").val() == "") { $("#regbtn").attr("disabled",true); } else { $("#regbtn").attr("disabled",false); } }); /*注册按钮*/ $("#regbtn").on('click',function() { codeVal(); if(ifpassword && ifCode){ completeReg(); } }); /*点击获取验证码*/ $('#obtain-code').on('click',function() { phoneVal(); }); /*校验手机号*/ function phoneVal() { var hunPhone = /^1[3|4|5|7|8]\d{9}$/; if(hunPhone.test($("#userphone").val())) { isReg(); } else { bombox("请输入正确的手机号码"); return; } } /*校验用户名是否注册*/ function isReg() { $.ajax({ url:"/ajax/isReg?key=" + $("#userphone").val(), dataType: 'json', //数据格式类型 type: 'GET', //http请求类型 timeout: 10000, //超时设置 success: function(data) { if(data.data == false) { bombox("您的手机已被注册"); return; } else { phoneCode = true; if(phoneCode){ sendAuthentication(); } } }, error: function() { bombox("服务器链接超时"); return; } }); } /*手机发送验证码*/ function sendAuthentication() { $.ajax({ url:"/ajax/regmobilephone", data: { mobilePhone: $("#userphone").val() }, dataType: 'json', //数据格式类型 type: 'GET', //http请求类型 async: false, timeout: 10000, //超时设置 success: function(data) { //console.log(data); if(data.success) { state = data.data; doClick(); } }, error: function() { bombox("服务器链接超时"); return; } }) } /*30s后重新获取验证码*/ function doClick() { $("#obtain-code").hide(); $("#getcodeoff").show(); $("#getcodeoff").text("30s后重新获取"); var clickTime = new Date().getTime(); var Timer = setInterval(function() { var nowTime = new Date().getTime(); var second = Math.ceil(30 - (nowTime - clickTime) / 1000); if(second > 0) { $("#getcodeoff").text(second + "s后重新获取"); } else { clearInterval(Timer); $("#obtain-code").show(); $("#getcodeoff").hide(); $("#obtain-code").text("获取验证码"); } }, 1000); } /*校验验证码*/ function codeVal() { $.ajax({ url:"/ajax/validCode", data: { "state": state, "vc": $("#code").val() }, dataType: 'json', //数据格式类型 async: false, type: 'POST', //http请求类型 timeout: 10000, //超时设置 success: function(data) { //console.log(data.success); if(data.success) { if(data.data==false) { bombox("验证码不正确"); return; }else{ passwordVal(); ifCode =true; return; } }else{ //console.log(data.msg); if(data.msg=="验证超时"){ bombox("验证码超时"); return; }else{ bombox("请填写正确的手机号,验证码"); return; } } }, error: function() { bombox("服务器链接超时"); return; } }) } /*校验注册密码*/ function passwordVal() { var passwordv = $("#password").val(); if(passwordv.length < 6) { bombox("请输入由6-24 个字符组成,区分大小写"); return; }else{ ifpassword = true; return; } } //注册提交 function completeReg() { $.ajax({ url:"/ajax/regmobile", data: { state: state, mobilePhone: $("#userphone").val(), validateCode: $("#code").val(), password: $("#password").val(), inviterId:inviterId }, dataType: 'json', //数据格式类型 type: 'post', //http请求类型 async: false, success: function(data) { if(data.success) { bombox("注册成功"); location.href="invitSucceed.html"; } }, error: function() { bombox("服务器链接超时"); } }); } });
portal-front - Gogs: Go Git Service

portal html css js resource

demandShow.html 4.2KB

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>浏览需求-科袖网</title> <link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" /> <link href="css/bootstrap.min.css" rel="stylesheet"> <link type="text/css" href="css/common.css" rel="stylesheet"> <link type="text/css" href="css/genindex.css" rel="stylesheet"> <script type="text/javascript" src="js/jquery-1.11.1.js"></script> </head> <body> <header id="header"> <script src="js/header.js"></script> </header> <div id="container"> <div class="containerCon"> <div class="contentCon clearfix conBlock"> <div class="leftconBox floatL"> <div class="showDetail"> <div class="h1Font" id="demandTit"></div> <div class="operateBlock bottomShow" style="margin-top:10px;"> <ul class="clearfix" id="demandNum"> <li><span>收藏</span> <em class="operateicon operateicon2 icon-collect" id="collectBtn"></em></li> <li> <span>分享到</span> <a href="" id="weibo" target="_blank"><em class="operateicon operateicon2 icon-sina"></em></a> <em class="operateicon operateicon2 icon-wechat shareWeixin"> <div class="shareCode clearfix"> <div class="floatL" id="qrcode"></div> <div class="shareWord floatR"> <p>打开微信“扫一扫”,<br/>打开网页后点击屏幕右上角“分享”按钮</p> </div> </div> </em> </li> </ul> </div> <!--详情区--> <div class="showMain"> <div class="showCon" style="min-height: 60px;" id="demandDesp"></div> <ul class="showli clearfix h3Font" id="demandInf"> </ul> <div class="showStatus"> </div> </div> </div> </div> <div class="rightconBox floatR"> <div class="conItem conItemG alignCenter" style="border:none;"> <a class="madiaHead cmpHead"> <div class="boxBlock"> <img class="boxBlockimg" src="" id="companyImg"> </div> </a> <div class="proInfo h3Font clearfix"> <a class="h1Font qiyego" id="Qname"></a> <span class="authiconNew" id="QauthFlag"></span> </div> <div class="proInfo h2Font clearfix" id="industry"> </div> <div class="goSpan displayNone"> <span class="attenSpan">关注</span> </div> <div class="form-item otherBlock currentBlock"> <div class="aboutTit">联系人</div> <div class="form-result addexpertRe" style="margin-top:0"> <ul class="addexpert" id="expertli"> </ul> </div> </div> </div> </div> </div> </div> </div> <!--反馈建议--> <script type="text/javascript" src="js/correctBack.js"></script> <footer> <script type="text/javascript" src="js/footer.js"></script> </footer> <script type="text/javascript" src="js/jquery.cookie.js"></script> <script type="text/javascript" src="js/jquery.similar.msgbox.js"></script> <script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script> <script type="text/javascript" src="js/jquery.page.js"></script> <script type="text/javascript" src="js/public/baseUtil.js"></script> <script type="text/javascript" src="js/public/genCom.js"></script> <script type="text/javascript" src="js/demandShow.js"></script> <script type="text/javascript" src="js/quickLogin.js"></script> <script type="text/javascript"> //分享关注按钮 $('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();}); $('.goSpan').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();}); //微信分享 var qrcode = new QRCode(document.getElementById("qrcode"), { width : 100, height : 100 }); function makeCode(){ var hurl = window.location.host; var demandId = GetQueryString("demandId"); var elurl = "http://" + hurl + "/e/d.html?id=" + demandId ; qrcode.makeCode(elurl); } makeCode(); </script> </body> </html>