inen Página web Go1.6 jiapeng/portal-front - Gogs: Go Git Service

1 Commits (ec4a08607f7f480234ce0c05040ac61df6491bac)

Autor SHA1 Mensaje Fecha
  jiapeng c5d9752792 --init %!s(int64=8) %!d(string=hace) años
portal-front - Gogs: Go Git Service

portal html css js resource

cmp-staffReg.js 8.8KB

    //接受企业邀请,注册「科袖」 $(function() { loginStatus();//判断个人是否登录 var sc = GetQueryString("sc"); var companyNameVal, companyPhoneVal, companyscVal, companyPswVal1, companyPswVal2; var setname = false; var phonePass = false; var phoneCode = false; var setnewpwd = false; var setnewpwd2 = false; var ifxuanze = true; initialVal() /*校验注册按钮显示状态*/ $('#cmpSettledul').on('keyup', "#companyName,#companyPhone,#companysc,#companyPsw1,#companyPsw2", function() { if($("#companyName").val() == "" || $("#companyPhone").val() == "" || $("#companysc").val() == "" || $("#companyPsw1").val() == "" || $("#companyPsw2").val() == "") { $("#companyRet").attr("disabled", true); } else { $("#companyRet").attr("disabled", false); } }); /*校验邀请人名称*/ $('#companyName').on('focus', function() { $(".msgCmp01 span").text(""); }); $('#companyName').on('blur', function() { checkName(); }); /*校验邀请人手机*/ $('#companyPhone').on('focus', function() { $(".msgCmp02").text(""); }); $('#companyPhone').on('keyup', function() { checkPhone(); }); $('#companyPhone').on('blur', function() { if($(".msgCmp02").text()!=""){ $(".msgCmp02").prev().addClass("frmmsg-warning"); }else{ $(".msgCmp02").prev().removeClass("frmmsg-warning"); } }); /*校验邀请验证码*/ $('#companysc').on('focus', function() { $(".msgCmp03").text(""); }); $('#companysc').on('blur', function() { checkSc(); }); /*校验新密码*/ $('#companyPsw1').on('focus', function() { $(".msgCmp04 span").text(""); }); $('#companyPsw1').on('blur', function() { checkNewPwd(); }); /*校验新密码*/ $('#companyPsw2').on('focus', function() { $(".msgCmp05 span").text(""); }); $('#companyPsw2').on('blur', function() { checkNewPwd2(); }); /*校验单选框*/ $(".cmpAgree").on("click", function() { if($(this).hasClass("ifxuanze")) { $(this).removeClass("ifxuanze"); $(this).attr("src", "images/c-sign-on_button_xuanze_nor.png") ifxuanze = false; } else { $(this).addClass("ifxuanze"); $(this).attr("src", "images/c-sign-on_button_xuanze_hig.png"); ifxuanze = true; } }) /*提交校验*/ $('#companyRet').on('click', function() { if(ifxuanze) { valEmail(); } else { $.MsgBox.Alert('提示', '请确认后勾选此选项') } }); function initialVal() { $.ajax("/ajax/inviteStaff/" + sc, { type: "POST", success: function($data) { //console.log($data) if($data.success) { $(".cmpOrgName").text($data.data.orgName); $(".companyEmail").val($data.data.email); } else { $.MsgBox.Alert('消息', '验证链接已失效') } }, error: function() { $.MsgBox.Alert('消息', '服务器请求失败') }, }); } function valEmail() { $.ajax("/ajax/isReg?key=" + $(".companyEmail").val(), { type: "GET", async: true, success: function($data) { if($data.data == false) { $.MsgBox.Alert('消息', '您的邮箱已被注册,请直接登录') } else { tijiaoFun(); } }, error: function() { $.MsgBox.Alert('消息', '服务器请求失败') }, }); } function checkName() { companyNameVal = $("#companyName").val(); if(companyNameVal.length == "") { $(".msgCmp01").prev().addClass("frmmsg-warning"); $(".msgCmp01 span").text("请输入您的真实姓名"); } else { $(".msgCmp01").prev().removeClass("frmmsg-warning"); $(".msgCmp01 span").text(""); setname = true; } } function checkPhone() { companyPhoneVal = $("#companyPhone").val(); $.ajax("/ajax/isReg?key=" + companyPhoneVal, { type: "GET", async: true, success: function($data) { if(companyPhoneVal.length == 0) { $(".msgCmp02").text("请输入您的手机号码"); $("#getcode").attr("disabled", true); } else { var hunPhone = /^1[3|4|5|7|8]\d{9}$/; if(hunPhone.test(companyPhoneVal.trim())) { if($data.data == false) { $(".msgCmp02").text("该手机已注册账户,您可以直接登录"); } else { $(".msgCmp02").prev().removeClass("frmmsg-warning"); $(".msgCmp02").text(""); phonePass = true; $("#getcode").attr("disabled", false); addEvent(btn, "click", handler); //手机必须验证正确,才执行 } } else { phonePass = false; $(".msgCmp02").text("请输入正确的手机号码"); $("#getcode").attr("disabled", true); } } }, error: function() { $.MsgBox.Alert('消息', '服务器请求失败') }, }); } function checkSc() { companyscVal = $("#companysc").val(); if(companyscVal.length == 0) { $(".msgCmp03").prev().addClass("frmmsg-warning"); $(".msgCmp03").text("请输入您收到的验证码"); phoneCode = false; } else { var d = /^[0-9a-zA-Z]{4}$/; if(d.test(companyscVal.trim())) { $(".msgCmp03").prev().removeClass("frmmsg-warning"); $(".msgCmp03").text(""); phoneCode = true; } else { $(".msgCmp03").prev().addClass("frmmsg-warning"); $(".msgCmp03").text("验证码为4位数字,请检查后重试"); phoneCode = false; } } } //手机发送验证码 var btn = document.getElementById("getcode"); var handler = function() { doClick(); phoneVerificationCode(); //调用发送手机验证码接口 removeEvent(btn, 'click', handler); //取消绑定该事件 } function addEvent(obj, type, handler) { if(obj.addEventListener) { obj.addEventListener(type, handler, false); } else if(obj.attachEvent) { obj.attachEvent('on' + type, handler); } } function removeEvent(obj, type, handler) { if(obj.removeEventListener) { obj.removeEventListener(type, handler, false); } else if(obj.detachEvent) { obj.detachEvent("on" + type, handler); } } function doClick() { removeClass(btn, 'getcodeon'); addClass(btn, 'getcodeoff'); btn.innerHTML = "60s后重新获取"; var clickTime = new Date().getTime(); var Timer = setInterval(function() { var nowTime = new Date().getTime(); var second = Math.ceil(60 - (nowTime - clickTime) / 1000); if(second > 0) { btn.innerHTML = second + "s后重新获取"; } else { clearInterval(Timer); removeClass(btn, 'getcodeoff'); addClass(btn, 'getcodeon'); btn.innerHTML = "免费获取验证码"; addEvent(btn, "click", handler); } }, 1000); } function hasClass(obj, cls) { return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')); } function addClass(obj, cls) { if(!hasClass(obj, cls)) obj.className += " " + cls; } function removeClass(obj, cls) { if(hasClass(obj, cls)) { var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)'); obj.className = obj.className.replace(reg, ' '); } } //手机发送验证码结束 var state; function phoneVerificationCode() { if(phonePass) { $.ajax("/ajax/regmobilephone", { type: "get", async: true, success: function(data) { if(data.success) { state = data.data; } }, error: function() { $.MsgBox.Alert('消息', '服务器请求失败'); }, data: { "mobilePhone": $("#companyPhone").val() }, dataType: 'json' }); } }; function checkNewPwd() { companyPswVal1 = $("#companyPsw1").val(); if(companyPswVal1.length < 6) { $(".msgCmp04").prev().addClass("frmmsg-warning"); $(".msgCmp04 span").text("密码由6-24个字符组成,区分大小写"); } else { $(".msgCmp04").prev().removeClass("frmmsg-warning"); $(".msgCmp04 span").text(""); setnewpwd = true; } } function checkNewPwd2() { companyPswVal2 = $("#companyPsw2").val(); if(companyPswVal2.length < 6) { $(".msgCmp05").prev().addClass("frmmsg-warning"); $(".msgCmp05 span").text("密码由6-24个字符组成,区分大小写"); } else if(companyPswVal1 != companyPswVal2) { $(".msgCmp05").prev().addClass("frmmsg-warning"); $(".msgCmp05 span").text("两次输入不一致,请重新输入"); } else { $(".msgCmp05").prev().removeClass("frmmsg-warning"); $(".msgCmp05 span").text(""); setnewpwd2 = true; } } function tijiaoFun() { if(setname && phonePass && phoneCode && setnewpwd && setnewpwd2) { $.ajax("/ajax/regInviteStaff", { data: { "key": sc, "state": state, "phone": companyPhoneVal, "validateCode": companyscVal, "name": companyNameVal, "passwd": companyPswVal2 }, type: "POST", dataType: 'json', async: true, success: function(data) { if(data.success) { location.href = "index.html"; } }, error: function() { $.MsgBox.Alert('消息', '服务器请求失败'); } }); } }; })
portal-front - Gogs: Go Git Service

portal html css js resource

tidings.html 3.4KB

    <!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"> <link rel="stylesheet" type="text/css" href="./css/main.html_aio_eb0d518.css"> <style> .list_title a{ width: 50%; text-align: center; display: inline-block; color:#333; font-size: 16px; } .list_title a.active { background-color: #d7d7d7; } </style> <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="main-content-wrapper"> <div class="chat_box clearfix" id="chatBox" > <div class="chat_list"> <div class="list_title"><a class="active">科袖消息<span class="kexiuTotal"></span></a><a href="platTiding.html">来自平台<span class="mesTotal"></span></a></div> <div class="list_body" tabindex="0" style="overflow: hidden; outline: none;"> </div> </div> <!-- 聊天右侧显示区域 --> <div class="chat_content" style="display:none;"> <div class="chat_content_head"> <div class="head_info"> <span class="left"> </span> <span class="center"> <span class="usepro"> <span class="user_name"></span> <em class="authiconNew " ></em> </span> <span class="chating_resume_status ellipsisSty" style="display:block;margin-top:6px;font-size:14px;"> </span> </span> <span class="right"> <a id="cUserPage" target="_blank" title="查看对方资料">查看对方资料</a><a class="repoMore" href="javascript:void(0)" id="repo"></a> <span id="report" style=" line-height: 35px;">举报</span> </span> </div> </div> <div class="chat_body clearfix" tabindex="1" style="overflow: hidden; outline: none;"> <div class="chat_body_list"> </div> </div> <div class="chat_content_bottom"> <div class="blocked-mask" style="display: none;"></div> <div class="tool_bar clearfix"></div> <div class="edit_area"> <div class="input_area" id="editeBox"> <textarea class="messContent" maxlength="1000"></textarea> <div><input type="button" class="btnModel " value="发送" disabled /></div> </div> </div> </div> </div> <div class="chat_content_nodata"> <p>点击左侧列表,查看对话记录</p> </div> </div> </div> <script type="text/javascript" src="js/correctBack.js"></script> <script type="text/javascript" src="js/jquery.cookie.js"></script> <script type="text/javascript" src="js/jquery.similar.msgbox.js"></script> <script src="js/jquery.nicescroll.min.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/tidings.js"></script> </body> </html>