邓淳远、崔鹏宇、翁思扬组云计算期末项目
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

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="stylesheet" type="text/css" href="../static/css/home.css">
  6. <title>忘记密码</title>
  7. <script src="../static/js/jquery-3.5.1.min.js"></script>
  8. <script src="http://api.html5media.info/1.1.8/html5media.min.js"></script>
  9. <script src="../static/js/ip.js"></script>
  10. <script type="text/javascript">
  11. function forget(obj){
  12. var phonenum = $(obj).parent().prev().prev().prev().prev().children("#phonenum").val();
  13. var username = $(obj).parent().prev().prev().prev().children("#username").val();
  14. var password = $(obj).parent().prev().prev().children("#password").val();
  15. var password1 = $(obj).parent().prev().children("#password1").val();
  16. var url = "http://"+url+":5000/bp_auth/forget";
  17. $.ajax({
  18. type: "POST",
  19. url: url,
  20. data: {
  21. phonenum: phonenum,
  22. username: username,
  23. password: password,
  24. password1: password1
  25. },
  26. success: function(data){
  27. if(data.code == 1){
  28. window.location = "/login";
  29. }
  30. else{
  31. window.location = "/forget";
  32. }
  33. },
  34. error: function(XMLHttpRequest, textStatus, errorThrown) {
  35. alert(textStatus);
  36. window.location = "/forget";
  37. }
  38. });
  39. }
  40. </script>
  41. </head>
  42. <body>
  43. <div class="background">
  44. <video autoplay loop muted>
  45. <source src="../static/video/video.mp4" type="video/mp4" />
  46. Your Browser is no longer supported.
  47. </video>
  48. </div>
  49. <div class="login">
  50. <div class="logo_1"></div>
  51. <div class="form-item">
  52. <p style="padding-bottom:15px"><input id="phonenum" oninput="value=value.replace(/[^\d]/g,'')" autocomplete="off" placeholder="电话号码" name="phonenum"></p>
  53. <p style="padding-bottom:15px"><input id="username" type="text" autocomplete="off" placeholder="用户名" name="username"></p>
  54. <p style="padding-bottom:15px"><input id="password" type="password" autocomplete="off" placeholder="登录密码" name="password"></p>
  55. <p style="padding-bottom:15px"><input id="password1" type="password" autocomplete="off" placeholder="确认登录密码" name="password1"></p>
  56. <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>
  57. </div>
  58. </div>
  59. </body>
  60. </html>