邓淳远、崔鹏宇、翁思扬组云计算期末项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

63 lines
2.6 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="../static/css/home.css">
<title>忘记密码</title>
<script src="../static/js/jquery-3.5.1.min.js"></script>
<script src="http://api.html5media.info/1.1.8/html5media.min.js"></script>
<script src="../static/js/ip.js"></script>
<script type="text/javascript">
function forget(obj){
var phonenum = $(obj).parent().prev().prev().prev().prev().children("#phonenum").val();
var username = $(obj).parent().prev().prev().prev().children("#username").val();
var password = $(obj).parent().prev().prev().children("#password").val();
var password1 = $(obj).parent().prev().children("#password1").val();
var url = "http://"+url+":5000/bp_auth/forget";
$.ajax({
type: "POST",
url: url,
data: {
phonenum: phonenum,
username: username,
password: password,
password1: password1
},
success: function(data){
if(data.code == 1){
window.location = "/login";
}
else{
window.location = "/forget";
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
window.location = "/forget";
}
});
}
</script>
</head>
<body>
<div class="background">
<video autoplay loop muted>
<source src="../static/video/video.mp4" type="video/mp4" />
Your Browser is no longer supported.
</video>
</div>
<div class="login">
<div class="logo_1"></div>
<div class="form-item">
<p style="padding-bottom:15px"><input id="phonenum" oninput="value=value.replace(/[^\d]/g,'')" autocomplete="off" placeholder="电话号码" name="phonenum"></p>
<p style="padding-bottom:15px"><input id="username" type="text" autocomplete="off" placeholder="用户名" name="username"></p>
<p style="padding-bottom:15px"><input id="password" type="password" autocomplete="off" placeholder="登录密码" name="password"></p>
<p style="padding-bottom:15px"><input id="password1" type="password" autocomplete="off" placeholder="确认登录密码" name="password1"></p>
<p><input type="submit" id="register" value="修改密码" onclick="forget(this)" style="padding-left:0;margin-left:0;width:350px;background-color:white;color:#1f6f4a;cursor:pointer"></p>
</div>
</div>
</body>
</html>