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.

166 lines
7.2 KiB
Plaintext

@{
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("Retrieve")" method="post" id="regForm">
<div class="company-name">忘记密码</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="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: {
mobile: {
required: true,
isMobile: true
},
mobileCode: "required",
password: {
required: true,
strongPwd: true
},
passwordRepeat: {
required: true,
equalTo: "#password"
},
captcha: "required"
},
messages: {
mobile: {
required: errIcon + "请输入手机号"
},
mobileCode: icon + "请输入手机验证码",
password: {
required: icon + "请输入密码"
},
passwordRepeat: {
required: icon + "请再次输入密码",
equalTo: icon + "两次输入的密码不一致"
},
captcha: icon + "请输入验证码"
}
});
$("#btnSubmit").click(function () {
if ($("#regForm").valid()) {
var seriaStr = $("#regForm").serialize();
debugger;
$.ajax({
method: 'POST',
url: '@Url.Action("Retrieve", "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>