文件
mashangyoujiu/Application/Vip/View/Set/forgetpwd.html

91 行
3.0 KiB
HTML
可执行文件

<!DOCTYPE html>
<html>
<!--[1.2.55]-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>安全校验</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vip/css/reset.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vip/css/forgetpwd.css"/>
</head>
<body>
<div class="box" style="margin: auto;margin-top: 20px;width: 96%;">
<input class="input1" id="phone" type="text" disabled value="{$phone}" />
<div style="position: relative;border-radius: 5px;margin-top: 5px;">
<input class="inp17" maxlength="6" id="code" type="text" placeholder="验证码" />
<div class="getcode">获取验证码</div>
<div class="recode"><span>60</span>s后重新获取</div>
</div>
<div class="bottom">
<button class="close">取消</button>
<button class="next">下一步</button>
</div>
</div>
</body>
<script src="__PUBLIC__/vip/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__PUBLIC__/vip/js/window-reload.js"></script>
<script src="__PUBLIC__/js/tips.js"></script>
<script>
$('.close').on('touchstart',function () {
window.history.go(-1);
})
$('.getcode').on('touchstart',function () {
$.post("/index.php/Vip/Set/getCode",{},function (data) {
if(data.success==1){
alertMsg(data.msg,1000);
resetCode();
}else {
alertMsg(data.msg,1000);
}
})
})
$(".next").on('touchstart',function(){
var code = $('#code').val();
if(code==''){
alertMsg('请输入验证码',1000);
return;
}
$.post("/index.php/Vip/Set/verifyCode",{
code:code
},function (data) {
if(data.success==1){
window.location.replace("/index.php/Vip/Set/resetpwd.html?verifyCode="+data.verifyCode);
}else {
alertMsg(data.msg,1000);
}
})
})
//手机验证码倒计时
function resetCode() {
$('.getcode').hide();
$('.recode>span').html('60');
$('.recode').show();
var second = 60;//倒计时60秒能重新发送
var second1 = 300;//验证码300秒过期
var timer = null;
var timer1 = null;
timer1 = setInterval(function () {
second1 -= 1;
if(second1 <= 0){
clearInterval(timer1);
$.ajax({
url:"/index.php/Vip/Login/clearsession"
});
}
},1000);
timer = setInterval(function() {
second -= 1;
if(second > 0) {
$('.recode>span').html(second);
} else {
clearInterval(timer);
$('.getcode').show();
$('.recode').hide();
}
}, 1000);
}
</script>
</html>