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.

88 lines
3.7 KiB
HTML

<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__/name.css">
<section class="trunker">
<section class="container">
<form id="form" action="" method="post" onsubmit="return false" class="">
<div class="name">
<!-- 子页公共头部 -->
<div class="subpage-heard">修改密码
<a href="javascript:window.history.go(-1);" class="arrows"></a>
</div>
<div class="name-info">
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/xiugaimima.png" alt="">
<div>原始密码</div>
</div>
<input type="text" placeholder="请输入原始密码" style="padding: 0" name="old_pwd" id="old_pwd" value="">
</div>
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/xiugaimima.png" alt="">
<div>新密码</div>
</div>
<input type="text" placeholder="请输入新密码" style="padding: 0" name="new_pwd" id="new_pwd" value="">
</div>
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/xiugaimima.png" alt="">
<div>确认密码</div>
</div>
<input type="text" placeholder="请输入确认密码" style="padding: 0" name="com_pwd" id="com_pwd" value="">
</div>
<div class="save jssubmit">保存修改</div>
</div>
</div>
</form>
</section>
</section>
<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;
}
if($.trim($("#new_pwd").val()).length < 6 || $.trim($("#new_pwd").val()).length > 12){
pmsg.msg('密码长度6-12个字符');
return false;
}
if($.trim($("#new_pwd").val()) != $.trim($("#com_pwd").val())){
pmsg.msg('两次密码输入不一致');
return false;
}
$.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('错误');
}
})
});
});
</script>
</block>