Files
jshERP/erp_web/register.html
2019-09-13 22:16:29 +08:00

175 lines
8.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="webkit" name="renderer"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="PoweredByJeeSiteV4.0"/>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta name="description" content="PoweredByJeeSiteV4.0"/>
<meta content="no-cache" http-equiv="Pragma"/>
<meta http-equiv="Expires" content="0"/>
<meta content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<title>注册 - 华夏ERP</title>
<link rel="shortcut icon" href="images/favicon.ico" type="image/png">
<script src="js/global.min.js?ctx=/js/a"></script>
<script src="js/jquery/jquery-1.12.4.min.js"></script>
<!-- <script src="js/static/jquery/jquery-migrate-1.4.1.min.js"></script> -->
<!--[if lt IE 9]>
<script src="js/common/h5fix.min.js"></script><![endif]-->
<link rel="stylesheet" href="css/fonts/font-icons.min.css">
<link rel="stylesheet" href="js/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="js/select2/4.0/select2.css">
<link rel="stylesheet" href="js/icheck/1.0/minimal/grey.css">
<link rel="stylesheet" href="js/adminlte/css/AdminLTE.min.css">
<link rel="stylesheet" href="css/jsherp.css">
<link rel="stylesheet" href="js/adminlte/css/skins/skin-blue-light2.css">
<link rel="stylesheet" href="js/jquery-toastr/2.0/toastr.min.css">
<link rel="stylesheet" href="js/modules/sys/sysRegister.css">
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="js/common/common.js"></script>
<script type="text/javascript" src="js/md5/md5.js"></script>
<script type="text/javascript" src="js/gVerify.js"></script>
</head>
<body class="hold-transition register-page">
<div class="wrapper">
<!--[if lte IE 9]><a style="position:absolute;top:0;left:0;z-index:100000;display:block;width:100%;font-size:14px;
color:#F00;text-decoration:none;background-color:#faffb3;text-align:center;"
href="js/upbw/index.html" target="_blank">您的浏览器版本过低或在兼容模式下,导致打开速度过慢,提升速度您可以切换到极速模式或升级为最新版,点击此处查看详情。</a>
<![endif]-->
<!--[if lte IE 8]><script>window.location.href = 'js/upbw/index.html';</script><![endif]-->
<!-- <link rel="stylesheet" href="js/static/icheck/1.0/square/blue.css"> -->
<link rel="stylesheet" href="js/jquery-toastr/2.0/toastr.min.css">
<link rel="stylesheet" href="js/modules/sys/sysLogin.css">
<div class="register-box">
<div class="register-logo">
<a href="/">
<b>华夏ERP</b>
<small>V1.0</small>
</a>
</div>
<div class="register-box-body">
<div class="form-group has-feedback">
<span class="glyphicon glyphicon-user form-control-feedback" title="登录账号"></span>
<input type="text" id="username" name="username" class="form-control required"
data-msg-required="请填写登录账号." placeholder="登录账号"/>
</div>
<div class="form-group has-feedback">
<span class="glyphicon glyphicon-lock form-control-feedback"
title="登录密码,鼠标按下显示密码"
onmousedown="$('#password').attr('type','text')"
onmouseup="$('#password').attr('type','password')">
</span>
<input type="password" id="password" name="password" class="form-control required"
data-msg-required="请填写登录密码." placeholder="登录密码" autocomplete="off"/>
</div>
<div class="form-group has-feedback">
<span class="glyphicon glyphicon-lock form-control-feedback"
title="登录密码,鼠标按下显示密码"
onmousedown="$('#password').attr('type','text')"
onmouseup="$('#password').attr('type','password')">
</span>
<input type="password" id="confirmPassword" name="confirmPassword" class="form-control required"
data-msg-required="请填写确认密码." placeholder="确认密码" autocomplete="off"/>
</div>
<div class="form-group has-feedback" id="isValidCodeLogin">
<div class="input-group">
<span class="input-group-addon">验证码:</span>
<input type="text" id="validCode" name="validCode" class="form-control" required="true"
data-msg-required="请填写验证码" data-msg-remote="验证码不正确."/>
<span class="input-group-addon p0">
<div id="imgCaptcha" title="点击刷新验证码"></div>
</span>
</div>
</div>
<div class="form-group">
<input type="hidden" name="__url" value="">
<button type="submit" class="btn btn-primary btn-block btn-flat"
id="btnSubmit" data-loading="注册验证成功,正在进入..."
data-register-valid="正在验证注册,请稍候...">立即注册
</button>
</div>
<div class="row">
<div class="col-xs-12">
<a href="login.html" class="pull-left">[ 立即登录 ]</a>
<div class="dropdown pull-right">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
<i class="fa icon-globe"></i> 官方网站
</a>
</div>
</div>
</div>
</div>
<div class="register-copyright">
© 2015-2020
<a style="color:#00458a;" href="https://www.huaxiaerp.com/" target="_blank">ERP系统</a>
<a style="color:#00458a;" href="http://www.beian.miit.gov.cn" target="_blank">苏ICP备19040373号</a>
<a style="color:#00458a;" href="https://gitee.com/jishenghua/JSH_ERP" target="_blank">华夏ERP</a>
<a href='https://gitee.com/jishenghua/JSH_ERP/stargazers' target="_blank">
<img src='https://gitee.com/jishenghua/JSH_ERP/badge/star.svg?theme=white' alt='star'></img>
</a>
</div>
</div>
</div>
</body>
<script>
$("#username, #password, #confirmPassword").on("focus blur", function () {
var a = this;
setTimeout(function () {
var b = $(a).css("borderColor");
if (b != "") {
$(a).prev().css("color", b)
}
}, 100)
}).blur();
var verifyCode = new GVerify("imgCaptcha");
//注册按钮绑定处理事件
$("#btnSubmit").off("click").on("click", function () {
if($("#validCode").val()) {
var res = verifyCode.validate($("#validCode").val());
if(res){
if(!$("#username").val()) {
alert("用户名不能为空!");
} else if(!$("#password").val()) {
alert("密码不能为空!");
} else if(!$("#confirmPassword").val()) {
alert("确认密码不能为空!");
} else if($("#password").val()!=$("#confirmPassword").val()) {
$("#confirmPassword").val("");
alert("确认密码不一致!");
} else {
//执行注册
$.ajax({
type: "post",
url: "/user/registerUser",
dataType: "json",
data: ({
loginame: $("#username").val(),
password: $("#password").val()
}),
success: function (res) {
if (res && res.code === 200) {
alert("注册成功,请进行登录!");
location.href = "login.html";
} else {
alert(res.msg);
verifyCode.refresh(); //刷新
}
},
//此处添加错误处理
error: function () {
alert("后台访问错误,请联系管理员!");
}
});
}
} else{
alert("验证码错误!");
}
} else {
alert("验证码为空!");
}
});
</script>
</html>