|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>设置密码</title>
|
|
|
<meta name="renderer" content="webkit">
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
<meta name="viewport"
|
|
|
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
<link rel="stylesheet" href="../../css/weadmin.css">
|
|
|
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
|
|
<!--[if lt IE 9]>
|
|
|
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
|
|
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
|
|
<![endif]-->
|
|
|
<style>
|
|
|
.layui-input-block {
|
|
|
margin-left: 40px;
|
|
|
}
|
|
|
.header {
|
|
|
width: 980px;
|
|
|
margin: 0 auto;
|
|
|
height: 75px;
|
|
|
line-height: 75px;
|
|
|
}
|
|
|
form {
|
|
|
padding-left: 15px;
|
|
|
}
|
|
|
.layui-form-label {
|
|
|
width: 66px;
|
|
|
padding-left: 0;
|
|
|
font-size: 15px;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
<div style="width: 980px;margin: 0 auto;">
|
|
|
<div class="header">
|
|
|
<img src="/dsSso/images/edusoa.png" style="margin-top: 8px;" />
|
|
|
<span style="font-size:26px;display: inline-block;margin-top:15px;vertical-align: middle;color: #666;"> | 找回密码</span>
|
|
|
</div>
|
|
|
<form class="layui-form">
|
|
|
<!--<div class="layui-input-block" style="font-size: 16px;margin: 15px 0;">-->
|
|
|
<!--您正在找回的账号是:<span id="user" style="font-weight: 900"></span>-->
|
|
|
<!--</div>-->
|
|
|
<div class="layui-form-item" style="margin:35px 0">
|
|
|
<label for="new" class="layui-form-label">
|
|
|
<span class="we-red">*</span>新密码
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="password" id="new" name="new" lay-verify="required|pwd" autocomplete="off" placeholder="请输入新密码" maxlength="18" minlength="6" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="repwd" class="layui-form-label">
|
|
|
<span class="we-red">*</span>确认密码
|
|
|
</label>
|
|
|
<div class="layui-input-inline textinput">
|
|
|
<input type="password" id="repwd" name="repwd" lay-verify="required|pwd" placeholder="请输入确认密码" maxlength="18" minlength="6" autocomplete="off" class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<label for="" class="layui-form-label">
|
|
|
</label>
|
|
|
<button class="layui-btn textinput" lay-filter="save" lay-submit="" id="save">保存</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
<div style="text-align:center;margin-top: 140px" id="copyright">
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
<script src="../../js/layui/layui.js" charset="utf-8"></script>
|
|
|
<script src="../../js/base64.js"></script>
|
|
|
|
|
|
<script>
|
|
|
layui.extend({
|
|
|
admin: '{/}../../static/js/admin'
|
|
|
});
|
|
|
layui.use(['form', 'jquery','layer'], function () {
|
|
|
var form = layui.form,
|
|
|
$ = layui.jquery,
|
|
|
admin = layui.admin,
|
|
|
layer = layui.layer;
|
|
|
|
|
|
function GetQueryString(name,istop) {
|
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
|
var r = window.location.search.substr(1).match(reg);
|
|
|
if(typeof(istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
|
|
|
|
|
if (r != null) return unescape(r[2]);
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
var flag=Base64.decode(GetQueryString("flag"));
|
|
|
// 密码校验 6-18位 大小写字母加数字
|
|
|
form.verify({
|
|
|
pwd: [
|
|
|
/^[A-Za-z0-9]{6,18}$/
|
|
|
,'密码必须是6到18位大小写字母与数字的组合,且不能出现空格'
|
|
|
]
|
|
|
});
|
|
|
|
|
|
// 版权信息
|
|
|
$.ajax({
|
|
|
type : "POST",
|
|
|
dataType : "json",
|
|
|
url : "/dsSso/common/getGlobalValueByKey",
|
|
|
data : {
|
|
|
"key" : "sso_copyright"
|
|
|
},
|
|
|
async : false,
|
|
|
success : function(result) {
|
|
|
if (result.success) {
|
|
|
$("#copyright").html(result.sso_copyright);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//监听提交
|
|
|
form.on('submit(save)', function (data) {
|
|
|
var f=data.field;
|
|
|
if(f.repwd!==f.new){
|
|
|
layer.msg('确认密码与新密码不一致,请重新输入',{icon:0});
|
|
|
return false;
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
url: "/dsSso/findPwdByFlag",
|
|
|
data: {
|
|
|
"flag":flag,
|
|
|
"pwd":f.new,
|
|
|
"againpwd": f.repwd,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
if (data.success) {
|
|
|
layer.msg('设置密码成功',{icon:1,time:2000,shade:0.3},function (data) {
|
|
|
window.close();
|
|
|
})
|
|
|
return false;
|
|
|
} else {
|
|
|
layer.alert(data.message, {icon: 0});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
return false;
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
</body>
|
|
|
|
|
|
</html> |