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.
84 lines
3.0 KiB
HTML
84 lines
3.0 KiB
HTML
5 years ago
|
<extend name="Public/bases" />
|
||
|
<block name="body" >
|
||
|
<link href="__CSS__/user.css" rel="stylesheet" >
|
||
|
<body class="">
|
||
|
<header class="header">
|
||
|
<div class="">
|
||
|
<a href="{:U('User/userset')}" class="hbtn back"><i class="iconfont icon-drop-left"></i></a>
|
||
|
<h1 class="caption">修改密码</h1>
|
||
|
</div>
|
||
|
</header>
|
||
|
<div class="occupy"></div>
|
||
|
<section class="trunker">
|
||
|
<section class="container">
|
||
|
<form id='form' action="" method="post">
|
||
|
<div class="t-table user-auth-list">
|
||
|
<ul class="table clearfix">
|
||
|
<li class="table-row">
|
||
|
<span class="table-cell">原始密码</span>
|
||
|
<span class="table-cell">
|
||
|
<input type="password" class="txt" id="old_pwd" name="old_pwd" placeholder="请输入原始密码" maxlength="12">
|
||
|
</span>
|
||
|
</li>
|
||
|
<li class="table-row">
|
||
|
<span class="table-cell">新密码</span>
|
||
|
<span class="table-cell">
|
||
|
<input type="password" class="txt" id="new_pwd" name="new_pwd" placeholder="请填写新密码" maxlength="12">
|
||
|
</span>
|
||
|
</li>
|
||
|
<li class="table-row">
|
||
|
<span class="table-cell">确认密码</span>
|
||
|
<span class="table-cell">
|
||
|
<input type="password" class="txt" id="com_pwd" name="com_pwd" placeholder="请再次确认密码" maxlength="12">
|
||
|
</span>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="btnbox user-set-btnbox">
|
||
|
<input type="button" class="btn jssubmit" value="完成">
|
||
|
</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>
|
||
|
</body>
|
||
|
</block>
|