login.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <!-- Required meta tags -->
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <link rel="shortcut icon" type="image/x-icon" href="../../favicon.ico">
  8. <!-- Bootstrap CSS -->
  9. <link href="assetss/css/bootstrap.min.css" rel="stylesheet" />
  10. <link href="assetss/css/bootstrap-extended.css" rel="stylesheet" />
  11. <link href="assetss/css/style.css" rel="stylesheet" />
  12. <link href="assetss/css/icons.css" rel="stylesheet">
  13. <!--<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">-->
  14. <link rel="stylesheet" href="assetss/css/bootstrap-icons.css">
  15. <!--光年-->
  16. <link href="../make/css/materialdesignicons.min.css" rel="stylesheet">
  17. <!-- loader-->
  18. <link href="assetss/css/pace.min.css" rel="stylesheet" />
  19. <title></title>
  20. </head>
  21. <body>
  22. <!--start wrapper-->
  23. <div class="wrapper">
  24. <!--start content-->
  25. <main class="authentication-content">
  26. <div class="container-fluid">
  27. <div class="authentication-card">
  28. <div class="card shadow rounded-0 overflow-hidden">
  29. <div class="row g-0">
  30. <div class="col-lg-6 bg-login d-flex align-items-center justify-content-center">
  31. <!--<img src="assetss/images/error/login-img.jpg" class="img-fluid" alt="">-->
  32. <img id="loginuser" src="" class="img-fluid" alt="图片">
  33. </div>
  34. <div class="col-lg-6">
  35. <div class="card-body p-4 p-sm-5">
  36. <h5 class="card-title">登录</h5>
  37. <p class="card-text mb-5">登录后台中心管理数据!</p>
  38. <form class="form-body" id="login-form">
  39. <div class="login-separater text-center mb-4"> <span>OR LOGIN IN WITH ACCOUNT</span>
  40. </div>
  41. <div class="row g-3">
  42. <div class="col-12">
  43. <label for="inputAccount" class="form-label">登录账号</label>
  44. <div class="ms-auto position-relative">
  45. <div class="position-absolute top-50 translate-middle-y search-icon px-3"><i class="mdi mdi-account-circle"></i></div>
  46. <input type="text" class="form-control radius-30 ps-5" id="account" name="account" placeholder="输入账号">
  47. </div>
  48. </div>
  49. <div class="col-12">
  50. <label for="inputChoosePassword" class="form-label">登录密码</label>
  51. <div class="ms-auto position-relative">
  52. <div class="position-absolute top-50 translate-middle-y search-icon px-3"><i class="mdi mdi-lock-open-outline"></i></div>
  53. <input type="password" class="form-control radius-30 ps-5" id="password" name="password" placeholder="请输入密码">
  54. </div>
  55. </div>
  56. <div class="col-6">
  57. <div class="form-check form-switch">
  58. <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked="">
  59. <label class="form-check-label" for="flexSwitchCheckChecked">记住密码</label>
  60. </div>
  61. </div>
  62. <div class="col-6 text-end"> <a href="">忘记密码 ?</a>
  63. </div>
  64. <div class="col-12">
  65. <div class="d-grid">
  66. <button type="submit" class="btn btn-primary radius-30">立即登录</button>
  67. </div>
  68. </div>
  69. <div class="col-12">
  70. <p class="mb-0">没有账号? <a href="register.html">去注册</a></p>
  71. </div>
  72. </div>
  73. </form>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </main>
  81. <footer class="footer">
  82. <div class="container">
  83. <div class="row align-items-center flex-row-reverse">
  84. <div class="col-md-12 col-sm-12 text-center">
  85. Copyright © <a href="javascript:void(0)" id = "site_name">阔景科技版权所有 </a> All rights reserved.
  86. <span id="year"></span> <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank" id = "site_icp">icp备案 </a>
  87. </div>
  88. </div>
  89. </div>
  90. </footer>
  91. <!--end page main-->
  92. <!--end wrapper-->
  93. <!--plugins-->
  94. <script src="assetss/js/jquery.min.js"></script>
  95. <script src="assetss/js/pace.min.js"></script>
  96. <script>
  97. $(function() {
  98. // 监听表单提交事件
  99. $("#login-form").submit(function(event) {
  100. // 阻止表单默认的提交行为
  101. event.preventDefault();
  102. // 获取表单数据
  103. var account = $("#account").val();
  104. var password = $("#password").val();
  105. // 发送Ajax请求
  106. $.ajax({
  107. type: "POST",
  108. url: "controller/Login.php",
  109. data: {
  110. account: account,
  111. password: password
  112. },
  113. dataType: "json",
  114. success: function(response) {
  115. if (response.code == 200) {
  116. alert(response.msg);
  117. window.location.href = "index.php";
  118. } else if (response.code == 2) {
  119. alert(response.msg);
  120. window.location.href = "index.php";
  121. } else {
  122. alert(response.msg);
  123. }
  124. },
  125. error: function() {
  126. alert("服务器连接失败,请重试!");
  127. }
  128. });
  129. });
  130. });
  131. $(function() {
  132. // 发送 Ajax 请求获取网站参数值
  133. $.ajax({
  134. type: "GET",
  135. url: "controller/public/WebConfig.php",
  136. dataType: "json",
  137. success: function(response) {
  138. // 在页面上渲染参数值
  139. $("#site_name").text(response.site_name);
  140. $("#site_seo").text(response.site_seo);
  141. $("#site_key").text(response.site_key);
  142. $("#site_ms").text(response.site_ms);
  143. $("#reuser").attr("src", response.reuser);
  144. $("#loginuser").attr("src", response.loginuser);
  145. $("#site_icp").text(response.site_icp);
  146. // 修改页面标题
  147. document.title = response.site_name + " - 代理登录数据平台中心";
  148. },
  149. error: function() {
  150. alert("服务器连接失败,请重试!");
  151. }
  152. });
  153. });
  154. </script>
  155. </body>
  156. </html>