188 行
6.1 KiB
HTML
可执行文件
188 行
6.1 KiB
HTML
可执行文件
<!DOCTYPE html>
|
|
<html>
|
|
<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/keyword.css" />
|
|
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vip/css/resetpwd.css"/>
|
|
<style>
|
|
img{
|
|
pointer-events: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="box">
|
|
<div class="box-input">
|
|
<input class="inp17" maxlength="6" id="pwd" type="password" placeholder="请输入支付密码" />
|
|
<div class="empty"></div>
|
|
<div class="cursor"></div>
|
|
<span class="pwdspan"></span>
|
|
</div>
|
|
<div class="box-input">
|
|
<input class="inp17" maxlength="6" id="repwd" type="password" placeholder="请再次输入支付密码" />
|
|
<div class="empty"></div>
|
|
<div class="cursor"></div>
|
|
<span class="pwdspan"></span>
|
|
</div>
|
|
<div class="bottom">
|
|
<button class="close">取消</button>
|
|
<button class="next">确定</button>
|
|
</div>
|
|
</div>
|
|
<!--键盘部分-->
|
|
<table class="keyboard" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td class="num">1</td>
|
|
<td class="num">2</td>
|
|
<td class="num">3</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="num">4</td>
|
|
<td class="num">5</td>
|
|
<td class="num">6</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="num">7</td>
|
|
<td class="num">8</td>
|
|
<td class="num">9</td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td class="zero num">0</td>
|
|
<td class="del"><img src="__PUBLIC__/vip/images/key_03.png" /></td>
|
|
</tr>
|
|
</table>
|
|
</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>
|
|
$('table').contextmenu(function (e) {
|
|
e.preventDefault();
|
|
})
|
|
var type = "<php>echo I('get.type');</php>";
|
|
|
|
$(".close").on('touchstart', function () {
|
|
window.history.go(-1);
|
|
})
|
|
|
|
$('input').on("focus", function () {
|
|
document.activeElement.blur();//屏蔽默认键盘弹出;
|
|
});
|
|
$('.keyico').on('touchstart', function () {
|
|
$(this).css('backgroundColor', "#ececec");
|
|
$('.keyico').on('touchend', function () {
|
|
$(this).css('backgroundColor', "white");
|
|
})
|
|
})
|
|
var num = '';
|
|
var elm = $('.inp17').eq(0);
|
|
var maxlength = 6;
|
|
$('.inp17').on('touchstart', function () {
|
|
$('.empty').hide();
|
|
if ($(this).val()) {
|
|
$(this).next().show();
|
|
}
|
|
$('.cursor').hide();
|
|
$(this).next().next().show();
|
|
num = $(this).val();
|
|
elm = $(this);
|
|
maxlength = parseInt($(this).attr('maxlength'));
|
|
})
|
|
//输入密码
|
|
$('.num').on('touchstart', function () {
|
|
$(this).css('backgroundColor', "#ececec");
|
|
$('.num').on('touchend', function () {
|
|
$(this).css('backgroundColor', "white");
|
|
})
|
|
if (num.length < maxlength) {
|
|
num += $(this).html();
|
|
var str = elm.nextAll('.pwdspan').html();
|
|
str += "•";
|
|
elm.nextAll('.pwdspan').html(str);
|
|
elm.val(num);
|
|
elm.next().show();
|
|
elm.next().next().css('left', elm.nextAll('.pwdspan').eq(0).width() + 15);
|
|
}
|
|
})
|
|
//清空密码
|
|
$('.empty').on('touchstart', function () {
|
|
$(this).css('backgroundColor', "#ececec");
|
|
$('.empty').on('touchend', function () {
|
|
$(this).css('backgroundColor', "white");
|
|
})
|
|
num = '';
|
|
$(this).prev().val('');
|
|
$('.empty').hide();
|
|
$(this).nextAll('.pwdspan').html('');
|
|
$(this).next().css('left', 15);
|
|
})
|
|
//删除密码
|
|
$('.del').on('touchstart', function () {
|
|
$(this).css('backgroundColor', "#ececec");
|
|
$('.del').on('touchend', function () {
|
|
$(this).css('backgroundColor', "white");
|
|
})
|
|
if (num.length) {
|
|
num = num.substr(0, num.length - 1);
|
|
var str = elm.nextAll('.pwdspan').html();
|
|
str = str.substr(0, str.length - 1);
|
|
elm.nextAll('.pwdspan').html(str);
|
|
elm.val(num);
|
|
if (!num.length) {
|
|
elm.next().hide();
|
|
}
|
|
if (num.length) {
|
|
elm.next().next().css('left', elm.nextAll('.pwdspan').eq(0).width() + 15);
|
|
} else {
|
|
elm.next().next().css('left', 15);
|
|
}
|
|
}
|
|
})
|
|
|
|
$(".next").on('touchstart', function () {
|
|
if (!$('#pwd').val()) {
|
|
alertMsg('请输入支付密码', 600);
|
|
return;
|
|
}
|
|
if ($('#pwd').val().length < 6) {
|
|
alertMsg('密码长度为6位', 600);
|
|
return;
|
|
}
|
|
if (!$('#repwd').val()) {
|
|
alertMsg('请再次输入支付密码', 600);
|
|
return;
|
|
}
|
|
if ($('#pwd').val() != $('#repwd').val()) {
|
|
alertMsg('密码不一致,请重试', 600);
|
|
return;
|
|
}
|
|
alertShowLoading({
|
|
title: '密码更新中'
|
|
}, function () {
|
|
$.post("/index.php/Vip/Set/resetpaswd", {
|
|
pwd: $('#pwd').val(),
|
|
verifyCode: "<php>echo I('get.verifyCode');</php>"
|
|
}, function (data) {
|
|
alertHideLoading();
|
|
if (data.success) {
|
|
alertMsg(data.msg, 1000, function () {
|
|
if(type){
|
|
window.history.go(-1);
|
|
}else {
|
|
window.history.go(-3);
|
|
}
|
|
});
|
|
} else {
|
|
alertMsg(data.msg, 1000);
|
|
}
|
|
})
|
|
})
|
|
|
|
})
|
|
</script>
|
|
</html>
|