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/BookingWeb/Views/User/Retrieve.cshtml

172 lines
7.3 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>@Resources.LangReg.PageTitle</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/login.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/retrieve.css" />
<!--新增样式结束-->
<script src="~/Content/hplus/js/jquery.min.js"></script>
<style>
.has-error span {
color: white !important;
}
</style>
</head>
<body class="image-back">
<div class="middle-box text-center animated fadeInDown">
<div class="signinpanel">
<h2 class="gray-text font-36">找回密码</h2>
<form class="m-t" role="form" action="@Url.Action("Retrieve")" method="post" id="retrieveForm">
<div class="form-group">
<input type="text" class="form-control" name="mobile" id="mobile" placeholder="请输入手机号">
</div>
<div class="form-group">
<div class="row">
<div class="col-md-8">
<input type="text" class="form-control" name="mobileCode" id="mobileCode" placeholder="手机验证码">
</div>
<div class="col-md-4">
<a id="btnGetMobileCode" class="btn btn-primary">获取验证码</a>
</div>
</div>
</div>
<div class="form-group">
<input type="password" class="form-control" name="password" id="password" placeholder="新密码">
</div>
<div class="form-group">
<input type="password" class="form-control" name="passwordRepeat" placeholder="确认密码">
</div>
<button type="button" class="btn btn-primary block m-b light-text deter" id="btnSubmit">确定</button>
<p class="text-muted text-center gray-text">
@Resources.LangReg.TextAlreadyHaveAccount <a href="@Url.Action("Login")" class="red-text"><strong>@Resources.LangReg.TextClickHereLogin &raquo;</strong></a>
</p>
</form>
</div>
</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>
var num = 0;
$(function () {
$("#retrieveForm").validate({
rules: {
mobile: {
required: true,
isMobile: true
},
mobileCode: "required",
password: {
required: true,
strongPwd: true
},
passwordRepeat: {
required: true,
equalTo: "#password"
}
},
messages: {
mobile: {
required: errIcon + "@Resources.LangSubAccount.ValidInputMobile"
},
mobileCode: errIcon + "@Resources.LangReg.ValidInputMobileCode",
password: {
required: errIcon + "@Resources.LangReg.ValidInputPwd"
},
passwordRepeat: {
required: errIcon + "@Resources.LangReg.ValidInputPwdRepeat",
equalTo: errIcon + "@Resources.LangReg.ValidPwdNotSame"
}
}
});
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
$("#btnSubmit").click(function () {
if ($("#retrieveForm").valid()) {
var seriaStr = $("#retrieveForm").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")';
}
}
});
}
});
$("#btnGetMobileCode").click(function () {
var mobile = $("#mobile").val();
if (mobile.length != 11) {
alert("@Resources.LangAll.ValidInvalidMobile");
return;
}
num = 120;
$.ajax({
type: '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 +'@Resources.LangReg.TextGetAfterSecond');
} else {
$("#btnGetMobileCode").removeAttr("disabled");
$("#btnGetMobileCode").text('@Resources.LangReg.TextGetVcode');
}
}, 1000);
});
$.validator.addMethod("strongPwd", function (value, element, params) {
return checkPwdStrong(value)
}, "@Resources.LangReg.ValidPwdStrong");
$.validator.addMethod("isMobile", function (value, element) {
var regex = /^1[3-9]{1}\d{9}$/;
return this.optional(element) || (regex.test(value));
}, "@Resources.LangAll.ValidInvalidMobile");
</script>
</body>
</html>