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

62 lines
2.6 KiB

  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 type="text/javascript">
  10. function forget(obj){
  11. var phonenum = $(obj).parent().prev().prev().prev().prev().children("#phonenum").val();
  12. var username = $(obj).parent().prev().prev().prev().children("#username").val();
  13. var password = $(obj).parent().prev().prev().children("#password").val();
  14. var password1 = $(obj).parent().prev().children("#password1").val();
  15. var url = "http://127.0.0.1:5000/forget";
  16. $.ajax({
  17. type: "POST",
  18. url: url,
  19. data: {
  20. phonenum: phonenum,
  21. username: username,
  22. password: password,
  23. password1: password1
  24. },
  25. success: function(data){
  26. alert(data.msg);
  27. if(data.code == 0){
  28. var newurl = "http://127.0.0.1:5000/login";
  29. window.location = newurl;
  30. }
  31. },
  32. error: function(XMLHttpRequest, textStatus, errorThrown) {
  33. alert(XMLHttpRequest.status);
  34. alert(XMLHttpRequest.readyState);
  35. alert(textStatus);
  36. window.location = url;
  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>