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.

80 lines
3.0 KiB
HTML

5 years ago
<extend name="Public/bases" />
<block name="body" >
<link href="__CSS__/user.css" rel="stylesheet" >
<script src="__JS__/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
<link rel="stylesheet" type="text/css" href="__CSS__/password.css">
<style>
body {
background: white;
}
input,button{
padding: 0;
}
</style>
<div class="name">
<!-- 子页公共头部 -->
<div class="subpage-heard">修改密码
<a href="#" class="arrows"></a>
</div>
<form action="" id="form">
<div class="login-box">
<div class="login-input">
<img src="img/suo.png" alt="">
<input type="text" placeholder="请输入原始密码" name="old_pwd" id="old_pwd" value="">
</div>
<div class="login-input">
<img src="img/suo.png" alt="">
<input type="password" placeholder="请输入新密码" name="new_pwd" id="new_pwd" value="">
</div>
<div class="login-input">
<img src="img/suo.png" alt="">
<input type="password" placeholder="请输入新密码" name="com_pwd" id="com_pwd" value="">
</div>
<div class="login-btn jssubmit">提交</div>
</div>
</form>
</div>
5 years ago
<div class="popmsg pop-dialog"></div>
<script src="__JS__/pop.lwx.min.js"></script>
<script>
$(function() {
$('.jssubmit').click(function() {
var pmsg = $('.popmsg').pop();
if($.trim($("#old_pwd").val()) == ''){
pmsg.msg('原始密码不能为空');
return false;
}
5 years ago
if($.trim($("#new_pwd").val()).length < 6 || $.trim($("#new_pwd").val()).length > 12){
pmsg.msg('密码长度6-12个字符');
return false;
}
5 years ago
if($.trim($("#new_pwd").val()) != $.trim($("#com_pwd").val())){
pmsg.msg('两次密码输入不一致');
return false;
5 years ago
}
$.ajax({
url:"{:U('User/userpassword')}",
type:"POST",
dataType:"json",
data:$("#form").serialize(),
success:function(result){
pmsg.msg(result.info);
if(result.url != ''){
setTimeout(function () {
window.location.href = result.url;
}, 2000);
}
},
error:function(){
alert('错误');
}
})
});
5 years ago
});
</script>
</block>