register.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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 rel="stylesheet" href="assetss/css/bootstrap-icons.css">
  14. <!-- loader-->
  15. <link href="assetss/css/pace.min.css" rel="stylesheet" />
  16. <!--光年-->
  17. <link href="../make/css/materialdesignicons.min.css" rel="stylesheet">
  18. <title></title>
  19. </head>
  20. <body>
  21. <!--start wrapper-->
  22. <div class="wrapper">
  23. <!--start content-->
  24. <main class="authentication-content">
  25. <div class="container-fluid">
  26. <div class="authentication-card">
  27. <div class="card shadow rounded-0 overflow-hidden">
  28. <div class="row g-0">
  29. <div class="col-lg-6 bg-login d-flex align-items-center justify-content-center">
  30. <!--<img src="assetss/images/error/login-img.jpg" class="img-fluid" alt="">-->
  31. <img id="reuser" src="" class="img-fluid" alt="图片">
  32. </div>
  33. <div class="col-lg-6">
  34. <div class="card-body p-4 p-sm-5">
  35. <h5 class="card-title">注册账号</h5>
  36. <p class="card-text mb-5">成为我们的代理商,无限可能!</p>
  37. <form class="form-body">
  38. <div class="login-separater text-center mb-4"> <span>OR SIGN UP WITH ACCOUNT</span>
  39. <hr>
  40. </div>
  41. <div class="row g-3">
  42. <div class="col-12 ">
  43. <label for="inputName" 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" placeholder="请输入账号" required>
  47. </div>
  48. </div>
  49. <div class="col-12">
  50. <label for="inputEmailAddress" 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" placeholder="请输入密码" required>
  54. </div>
  55. </div>
  56. <div class="col-12 ">
  57. <label for="inputUsername" class="form-label">店铺名称</label>
  58. <div class="ms-auto position-relative">
  59. <div class="position-absolute top-50 translate-middle-y search-icon px-3"><i class="mdi mdi-cow"></i></div>
  60. <input type="text" class="form-control radius-30 ps-5" id="username" placeholder="请输入代理名称" required>
  61. </div>
  62. </div>
  63. <div class="col-12">
  64. <label for="inputChoosePassword" class="form-label">邀请码</label>
  65. <div class="ms-auto position-relative">
  66. <div class="position-absolute top-50 translate-middle-y search-icon px-3"><i class="bx bx-code-alt"></i></div>
  67. <input type="text" class="form-control radius-30 ps-5" id="puid" placeholder="填写邀请码" required>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="col-12" style="margin-top:20px;margin-bottom:20px;">
  72. <div class="form-check form-switch">
  73. <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked>
  74. <label class="form-check-label" for="flexSwitchCheckChecked">我同意
  75. <a href="">用户注册协议</a>和
  76. <a href="">平台隐私政策</a>
  77. </label>
  78. </div>
  79. </div>
  80. <div class="col-12">
  81. <div class="d-grid">
  82. <button type="submit" class="btn btn-primary radius-30">立即注册</button>
  83. </div>
  84. </div>
  85. <div class="col-12" style="margin-top:20px;">
  86. <p class="mb-0">已有账号? <a href="login.html">去登录</a></p>
  87. </div>
  88. </form>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <footer class="footer">
  96. <div class="container">
  97. <div class="row align-items-center flex-row-reverse">
  98. <div class="col-md-12 col-sm-12 text-center">
  99. Copyright © <a href="javascript:void(0)" id = "site_name">阔景科技版权所有 </a> All rights reserved.
  100. <span id="year"></span> <a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank" id = "site_icp">icp备案 </a>
  101. </div>
  102. </div>
  103. </div>
  104. </footer>
  105. </main>
  106. <!--end page main-->
  107. </div>
  108. <!--end wrapper-->
  109. <!--plugins-->
  110. <script src="assetss/js/jquery.min.js"></script>
  111. <script src="assetss/js/pace.min.js"></script>
  112. <script>
  113. $(function() {
  114. // 发送 Ajax 请求获取网站参数值
  115. $.ajax({
  116. type: "GET",
  117. url: "controller/public/WebConfig.php",
  118. dataType: "json",
  119. success: function(response) {
  120. // 在页面上渲染参数值
  121. $("#site_name").text(response.site_name);
  122. $("#site_seo").text(response.site_seo);
  123. $("#site_key").text(response.site_key);
  124. $("#site_ms").text(response.site_ms);
  125. $("#reuser").attr("src", response.reuser);
  126. $("#loginuser").attr("src", response.loginuser);
  127. $("#site_icp").text(response.site_icp);
  128. // 修改页面标题
  129. document.title = response.site_name + " - 注册成为我们的代理商";
  130. },
  131. error: function() {
  132. alert("服务器连接失败,请重试!");
  133. }
  134. });
  135. });
  136. $(document).ready(function() {
  137. // 获取传递的puid参数
  138. var puid = getUrlParameter('puid');
  139. if (puid !== '') {
  140. // 将puid填充到邀请码输入框中
  141. $("#puid").val(puid);
  142. }
  143. // 提交表单数据
  144. $("form").submit(function(e) {
  145. e.preventDefault(); // 阻止表单默认提交行为
  146. // 获取表单数据
  147. var account = $("#account").val();
  148. var password = $("#password").val();
  149. var username = $("#username").val();
  150. var puid = $("#puid").val();
  151. // 创建要提交的数据对象
  152. var formData = {
  153. account: account,
  154. password: password,
  155. puid: puid,
  156. username:username,
  157. };
  158. // 发起Ajax请求
  159. $.ajax({
  160. type: "POST",
  161. url: "controller/Resgin.php",
  162. data: formData,
  163. success: function(response) {
  164. // 处理成功响应的代码
  165. // console.log(response);
  166. alert(JSON.parse(response).msg)
  167. // alert(response.msg);
  168. if (JSON.parse(response).code === 2) {
  169. // 跳到登录页
  170. window.location.href = "login.html";
  171. }
  172. },
  173. error: function(xhr) {
  174. // 请求失败后的处理
  175. // console.log(xhr.responseText);
  176. alert('系统出错,请稍后再试');
  177. }
  178. });
  179. });
  180. });
  181. // 获取URL参数的函数
  182. function getUrlParameter(name) {
  183. name = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
  184. var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
  185. var results = regex.exec(location.search);
  186. return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
  187. }
  188. </script>
  189. </body>
  190. </html>