You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/BookingJieFeng/obj/Release/Package/PackageTmp/Views/User/Regist.cshtml

193 lines
8.5 KiB
Plaintext

2 years ago
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>用户注册</title>
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="~/Content/hplus/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="~/Content/hplus/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="~/Content/hplus/css/animate.min.css" />
<link type="text/css" rel="stylesheet" href="~/Content/hplus/css/style.min.css" />
<link type="text/css" rel="stylesheet" href="~/Content/hplus/css/plugins/iCheck/custom.css" />
<link type="text/css" rel="stylesheet" href="~/Content/css/login.min.css" />
<link type="text/css" rel="stylesheet" href="~/Content/css/common.css" />
<link type="text/css" rel="stylesheet" href="~/Content/css/resect.css" />
<script src="~/Content/hplus/js/jquery.min.js"></script>
</head>
<body class="signin image-back pace-done">
<div class="signinpanel">
<form class="middle-box text-center animated fadeInDown" action="@Url.Action("Regist")" method="post" id="regForm">
<div class="company-name">欢迎注册东胜订舱平台</div>
<div class="form-group">
<input type="text" placeholder="姓名" name="name" class="form-control" />
</div>
<div class="form-group">
<input type="text" placeholder="手机号" name="mobile" id="mobile" class="form-control" />
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-8 phone-code">
<input type="text" placeholder="手机验证码" name="mobileCode" id="mobileCode" class="form-control" />
</div>
<div class="col-lg-4 col-md-4 col-sm-4 code">
<a id="btnGetMobileCode" class="btn btn-primary">获取验证码</a>
</div>
</div>
</div>
<div class="form-group">
<input type="password" placeholder="密码" name="password" id="password" class="form-control" />
</div>
<div class="form-group">
<input type="password" placeholder="再次输入密码" name="passwordRepeat" class="form-control" />
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-8 phone-code">
<input type="text" placeholder="验证码" name="captcha" class="form-control" />
</div>
<div class="col-lg-4 col-md-4 col-sm-4 code">
<img src="@Url.Action("GetCaptcha", "common")" />
</div>
</div>
</div>
<div class="form-group">
<input type="text" placeholder="邮箱" name="email" class="form-control" />
</div>
<div class="form-group">
<input type="text" placeholder="公司全称" name="company_name" class="form-control" />
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-1 col-md-1 col-sm-1 agree">
<input type="checkbox" name="REC_BC_MAIL" value="True" checked/>
</div>
<label class="col-lg-4 col-md-4 col-sm-4 font-6">同意接收BC邮件</label>
</div>
</div>
<div class="group">
<button type="button" id="btnSubmit" class="btn btn-primary block full-width m-b light-text">同意并注册</button>
</div>
<div class="col-lg-12 col-md-12 resect form-group clearfix">已经有账户了?<a href="@Url.Action("Login")">点此登录</a></div>
</form>
</div>
<script src="~/Content/hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="~/Content/hplus/js/bootstrap.min.js?v=3.3.5"></script>
<script src="~/Content/hplus/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="~/Content/hplus/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="~/Content/hplus/js/plugins/layer/layer.min.js"></script>
<script src="~/Content/hplus/js/hplus.min.js?v=4.0.0"></script>
<script src="~/Content/hplus/js/contabs.min.js"></script>
<script src="~/Content/hplus/js/plugins/pace/pace.min.js"></script>
<script src="~/Content/hplus/js/plugins/iCheck/icheck.min.js"></script>
<script src="~/Content/hplus/js/plugins/validate/jquery.validate.min.js"></script>
<script src="~/Content/hplus/js/plugins/validate/messages_zh.min.js"></script>
<script src="~/Content/js/validatorConfig.js"></script>
<script src="~/Content/js/common.js"></script>
<script type="text/javascript">
var num = 0;
var icon = "<i class='fa fa-times-circle'></i> ";
$(function () {
$("#regForm").validate({
rules: {
name: "required",
mobile: {
required: true,
isMobile: true
},
mobileCode: "required",
password: {
required: true,
strongPwd: true
},
passwordRepeat: {
required: true,
equalTo: "#password"
},
captcha: "required",
email: "required",
company_name: "required"
},
messages: {
name: icon + "请输入姓名",
mobile: {
required: errIcon + "请输入手机号"
},
mobileCode: icon + "请输入手机验证码",
password: {
required: icon + "请输入密码"
},
passwordRepeat: {
required: icon + "请再次输入密码",
equalTo: icon + "两次输入的密码不一致"
},
captcha: icon + "请输入验证码",
email: icon + "请输入邮箱",
company_name: icon + "请输入公司名称"
}
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#btnSubmit").click(function () {
if ($("#regForm").valid()) {
var seriaStr = $("#regForm").serialize();
debugger;
$.ajax({
method: 'POST',
url: '@Url.Action("Regist", "User")',
data: seriaStr,
success: function (data) {
alert(data.Message);
if (data.Success) {
//$("#regForm input").val("");
location.href = '@Url.Action("login")';
}
}
});
}
});
$("#regForm img").click(function () {
this.src = '@Url.Action("GetCaptcha", "common")?rnd=' + new Date()
});
$("#btnGetMobileCode").click(function () {
var mobile = $("#mobile").val();
if (mobile.length != 11) {
alert("请输入正确的手机号码");
return;
}
num = 120;
$.ajax({
method: 'POST',
url: '@Url.Action("GetMobileCode", "common")?mobile=' + mobile,
success: function (data) {
alert(data.Message);
}
});
});
setInterval(function () {
if (num > 0) {
num--;
$("#btnGetMobileCode").attr("disabled","disabled");
$("#btnGetMobileCode").text(num +'秒');
} else {
$("#btnGetMobileCode").removeAttr("disabled");
$("#btnGetMobileCode").text('获取验证码');
}
}, 1000);
});
</script>
</body>
</html>