216 lines
4.9 KiB
Plaintext
216 lines
4.9 KiB
Plaintext
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%@include file="../baseset.jsp" %>
|
|
<%@include file="../systemset.jsp" %>
|
|
<%@include file="../webPortal/webPortalCommonSet.jsp" %>
|
|
|
|
<link href="${bonuspath}/static/plugins/select2/css/select2.min.css" rel="stylesheet">
|
|
<script src="${bonuspath}/static/plugins/select2/js/select2.min.js"></script>
|
|
<script src="${bonuspath}/static/plugins/select2/js/i18n/zh-CN.js"></script>
|
|
<script src="${bonuspath}/static/plugins/layer/2.1/extend/layer.ext.js"></script>
|
|
<script src="${bonuspath}/static/js/jquery/jquery.md5.js"></script>
|
|
|
|
<title></title>
|
|
|
|
<style type="text/css">
|
|
#baseInfo{
|
|
/* border:1px solid; */
|
|
text-align: center;
|
|
width:96%;
|
|
margin:0 2% 0 2%;
|
|
}
|
|
|
|
#baseInfo tr{
|
|
height: 2.5em;
|
|
}
|
|
|
|
#baseInfo tr>input{
|
|
width:96%;
|
|
}
|
|
#machineTable th{
|
|
padding:5px;
|
|
vertical-align:middle;
|
|
}
|
|
|
|
.inp{
|
|
width:60%;
|
|
}
|
|
|
|
#img{
|
|
width:100%;
|
|
height:150px;
|
|
}
|
|
|
|
.img{
|
|
z-index:1;
|
|
width:100px;
|
|
height:100px;
|
|
border:solid 1px black;
|
|
}
|
|
.img_div{
|
|
display: inline-block;
|
|
padding:10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<table id="baseInfo" cellspacing="0" cellpadding="0" border="0" class="customTable">
|
|
|
|
<input type="hidden" id="" value="" />
|
|
|
|
<tbody>
|
|
<tr style="margin-top:1em;">
|
|
<td width="30%"><span>手机号码:</span></td>
|
|
<td width="60%"><input class="inp" name="phone" id="phone" type="text"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30%"><span>验证码:</span></td>
|
|
<td width="60%">
|
|
<input style="width:35%" id="code" name="code" class="inp" type="text">
|
|
<input type="button" class="btn" id="reqBtn" style="width: 24%;color: black; padding:5px 12px; height:auto;
|
|
background-color: #FFFAFA" onclick="setTime(this),requestResetPasswordCode()" value="获取验证码">
|
|
</td>
|
|
</tr >
|
|
<tr class="pwd" hidden="hidden">
|
|
<td width="30%"><span>输入新密码:</span></td>
|
|
<td width="60%"><input id="onePwd" class="inp" type="password"></td>
|
|
</tr>
|
|
<tr class="pwd" hidden="hidden">
|
|
<td width="30%"><span>再次输入新密码:</span></td>
|
|
<td width="60%"><input id="twoPwd" class="inp" type="password"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
/**
|
|
* @author 无畏
|
|
* @date 2019-05-24
|
|
* @function 启动执行
|
|
* @returns
|
|
*/
|
|
$(function () {
|
|
|
|
|
|
});
|
|
|
|
/**
|
|
* @author 无畏
|
|
* @date 2019-06-28
|
|
* @function 父页面回调函数
|
|
* @returns
|
|
*/
|
|
function callback(){
|
|
var pwd = $("#onePwd").val();
|
|
var phone = $("#phone").val();
|
|
var code = $("#code").val();
|
|
var param = "pwd="+$.md5(pwd)+"&phone="+phone+"&code="+code
|
|
return param;
|
|
}
|
|
|
|
/**
|
|
* @author 无畏
|
|
* @date 2019-06-28
|
|
* @function 校验数据
|
|
* @returns
|
|
*/
|
|
function validParam(){
|
|
var phone = $("#phone").val();
|
|
var code = $("#code").val();
|
|
|
|
var one = $("#onePwd").val();
|
|
var two = $("#twoPwd").val();
|
|
|
|
if(!JY.Object.notNull(phone)){
|
|
layer.msg("请输入手机号码!",{icon:7,time:1500});
|
|
return false;
|
|
}
|
|
|
|
if(!JY.Object.notNull(code)){
|
|
layer.msg("请输入验证码!",{icon:7,time:1500});
|
|
return false;
|
|
}
|
|
|
|
if(!JY.Object.notNull(one)){
|
|
layer.msg("请输入新密码!",{icon:7,time:1500});
|
|
return false;
|
|
}
|
|
|
|
if(!JY.Object.notNull(two)){
|
|
layer.msg("请再次输入新密码!",{icon:7,time:1500});
|
|
return false;
|
|
}
|
|
|
|
if(one != two){
|
|
layer.msg("两次输入密码不一致!",{icon:7,time:1500});
|
|
return false;
|
|
}
|
|
|
|
if(one.length < 6){
|
|
layer.msg("密码长度过短!",{icon:7,time:1500});
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
var countDown = 60;
|
|
function setTime(val) {
|
|
var phone =$("#phone").val();
|
|
if(!JY.Validate.isPhone(phone)){
|
|
val.removeAttribute("disabled");
|
|
val.value = "获取验证码";
|
|
countDown = 60;
|
|
return;
|
|
}
|
|
if (countDown == 0) {
|
|
val.removeAttribute("disabled");
|
|
val.value = "获取验证码";
|
|
countDown = 60;
|
|
return;
|
|
}else {
|
|
val.setAttribute("disabled", true);
|
|
val.value = "重新发送(" + countDown + ")";
|
|
countDown--;
|
|
}
|
|
setTimeout(function() {
|
|
setTime(val)
|
|
}, 1000)
|
|
};
|
|
|
|
function requestResetPasswordCode(){
|
|
$(".pwd").attr("hidden","hidden");
|
|
$(".pwd").find("input").val("");
|
|
var phone =$("#phone").val();
|
|
if(!JY.Validate.isPhone(phone)){
|
|
layer.msg("请正确输入的手机号码!",{icon:7,time:1500});
|
|
return;
|
|
}
|
|
$.ajax({
|
|
type: "get",
|
|
url: bonuspath + '/backstage/user/requestResetPasswordCode?phone='+phone,
|
|
dataType: "json",
|
|
success: function(data) {
|
|
log(data);
|
|
if(data.res == 1){
|
|
layer.msg(data.resMsg,{icon:1,time:1500});
|
|
$(".pwd").removeAttr("hidden");
|
|
}else{
|
|
layer.msg(data.resMsg,{icon:2,time:1500});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html> |