login12.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>后台管理-登陆</title>
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta http-equiv="Access-Control-Allow-Origin" content="*">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  10. <meta name="apple-mobile-web-app-capable" content="yes">
  11. <meta name="format-detection" content="telephone=no">
  12. <link rel="stylesheet" href="../lib/layui-v2.5.5/css/layui.css" media="all">
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <style>
  18. html, body {
  19. width: 100%;
  20. height: 100%;
  21. overflow: hidden
  22. }
  23. body {
  24. background: #1E9FFF;
  25. }
  26. body:after {
  27. content: '';
  28. background-repeat: no-repeat;
  29. background-size: cover;
  30. -webkit-filter: blur(3px);
  31. -moz-filter: blur(3px);
  32. -o-filter: blur(3px);
  33. -ms-filter: blur(3px);
  34. filter: blur(3px);
  35. position: absolute;
  36. top: 0;
  37. left: 0;
  38. right: 0;
  39. bottom: 0;
  40. z-index: -1;
  41. }
  42. .layui-container {
  43. width: 100%;
  44. height: 100%;
  45. overflow: hidden
  46. }
  47. .admin-login-background {
  48. width: 360px;
  49. height: 300px;
  50. position: absolute;
  51. left: 50%;
  52. top: 40%;
  53. margin-left: -180px;
  54. margin-top: -100px;
  55. }
  56. .logo-title {
  57. text-align: center;
  58. letter-spacing: 2px;
  59. padding: 14px 0;
  60. }
  61. .logo-title h1 {
  62. color: #1E9FFF;
  63. font-size: 25px;
  64. font-weight: bold;
  65. }
  66. .login-form {
  67. background-color: #fff;
  68. border: 1px solid #fff;
  69. border-radius: 3px;
  70. padding: 14px 20px;
  71. box-shadow: 0 0 8px #eeeeee;
  72. }
  73. .login-form .layui-form-item {
  74. position: relative;
  75. }
  76. .login-form .layui-form-item label {
  77. position: absolute;
  78. left: 1px;
  79. top: 1px;
  80. width: 38px;
  81. line-height: 36px;
  82. text-align: center;
  83. color: #d2d2d2;
  84. }
  85. .login-form .layui-form-item input {
  86. padding-left: 36px;
  87. }
  88. .captcha {
  89. width: 60%;
  90. display: inline-block;
  91. }
  92. .captcha-img {
  93. display: inline-block;
  94. width: 34%;
  95. float: right;
  96. }
  97. .captcha-img img {
  98. height: 34px;
  99. border: 1px solid #e6e6e6;
  100. height: 36px;
  101. width: 100%;
  102. }
  103. </style>
  104. </head>
  105. <body>
  106. <div class="layui-container">
  107. <div class="admin-login-background">
  108. <div class="layui-form login-form">
  109. <form class="layui-form" action="">
  110. <div class="layui-form-item logo-title">
  111. <h1>江宁开发区干部员工电子廉政档案系统</h1>
  112. </div>
  113. <div class="layui-form-item">
  114. <label class="layui-icon layui-icon-username"></label>
  115. <input type="text" name="account" lay-verify="required|account" placeholder="用户名或者邮箱"
  116. autocomplete="off" class="layui-input" value="admin">
  117. </div>
  118. <div class="layui-form-item">
  119. <label class="layui-icon layui-icon-password"></label>
  120. <input type="password" name="password" lay-verify="required|password" placeholder="密码"
  121. autocomplete="off" class="layui-input" value="123456">
  122. </div>
  123. <div class="layui-form-item">
  124. <label class="layui-icon layui-icon-vercode"></label>
  125. <input type="text" name="captcha" lay-verify="required|captcha" placeholder="图形验证码"
  126. autocomplete="off" class="layui-input verification captcha" value="xszg">
  127. <div class="captcha-img">
  128. <img id="captchaPic" src="./images/captcha.jpg">
  129. </div>
  130. </div>
  131. <div class="layui-form-item">
  132. <input type="checkbox" name="rememberMe" value="true" lay-skin="primary" title="记住密码">
  133. </div>
  134. <div class="layui-form-item">
  135. <button class="layui-btn layui-btn layui-btn-normal layui-btn-fluid" lay-submit=""
  136. lay-filter="login">登 入
  137. </button>
  138. </div>
  139. </form>
  140. </div>
  141. </div>
  142. </div>
  143. <script src="./lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
  144. <script src="./lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
  145. <script src="./lib/jq-module/jquery.particleground.min.js" charset="utf-8"></script>
  146. <script src="./js/lay-config.js?v=1.0.4" charset="utf-8"></script>
  147. <script>
  148. layui.use(['form', 'http'], function () {
  149. var form = layui.form,
  150. http = layui.http,
  151. $ = layui.jquery,
  152. layer = layui.layer;
  153. // 登录过期的时候,跳出ifram框架
  154. if (top.location != self.location) top.location = self.location;
  155. // 粒子线条背景
  156. $(document).ready(function () {
  157. $('.layui-container').particleground({
  158. dotColor: '#7ec7fd',
  159. lineColor: '#7ec7fd'
  160. });
  161. });
  162. // 进行登录操作
  163. form.on('submit(login)', function (data) {
  164. data = data.field;
  165. if (data.username == '') {
  166. layer.msg('用户名不能为空');
  167. return false;
  168. }
  169. if (data.password == '') {
  170. layer.msg('密码不能为空');
  171. return false;
  172. }
  173. // if (data.captcha == '') {
  174. // layer.msg('验证码不能为空');
  175. // return false;
  176. // }
  177. http.login(data)
  178. return false;
  179. });
  180. });
  181. </script>
  182. </body>
  183. </html>