login.jsp 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  5. %>
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  10. <!-- 避免IE使用兼容模式 -->
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
  12. <meta name="renderer" content="webkit">
  13. <meta name="keywords" content='easyui,jui,jquery easyui,easyui demo,easyui中文'/>
  14. <meta name="description" content='TopJUI前端框架,基于最新版EasyUI前端框架构建,纯HTML调用功能组件,不用写JS代码的EasyUI,专注你的后端业务开发!'/>
  15. <title>车闸管理系统 - 用户登录</title>
  16. <!-- 浏览器标签图片 -->
  17. <link rel="shortcut icon" href="../image/2.png"/>
  18. <link rel="stylesheet" href="../static/plugins/bootstrap/css/bootstrap.min.css">
  19. <link rel="stylesheet" href="../static/plugins/font-awesome/css/font-awesome.min.css">
  20. <script type="text/javascript" src="../static/plugins/jquery/jquery.min.js"></script>
  21. <style type="text/css">
  22. html, body {
  23. height: 100%;
  24. }
  25. .box {
  26. background: url("../image/loginBg.jpg") no-repeat center center;
  27. background-size: cover;
  28. margin: 0 auto;
  29. position: relative;
  30. width: 100%;
  31. height: 100%;
  32. }
  33. .login-box {
  34. width: 100%;
  35. max-width: 500px;
  36. height: 400px;
  37. position: absolute;
  38. top: 50%;
  39. margin-top: -200px;
  40. /*设置负值,为要定位子盒子的一半高度*/
  41. }
  42. @media screen and (min-width: 500px) {
  43. .login-box {
  44. left: 50%;
  45. /*设置负值,为要定位子盒子的一半宽度*/
  46. margin-left: -250px;
  47. }
  48. }
  49. .form {
  50. width: 100%;
  51. max-width: 500px;
  52. height: 275px;
  53. margin: 2px auto 0px auto;
  54. }
  55. .login-content {
  56. border-bottom-left-radius: 8px;
  57. border-bottom-right-radius: 8px;
  58. height: 250px;
  59. width: 100%;
  60. max-width: 500px;
  61. background-color: rgba(255, 250, 2550, .6);
  62. float: left;
  63. }
  64. .input-group {
  65. margin: 30px 0px 0px 0px !important;
  66. }
  67. .form-control,
  68. .input-group {
  69. height: 40px;
  70. }
  71. .form-actions {
  72. margin-top: 10px;
  73. }
  74. .form-group {
  75. margin-bottom: 0px !important;
  76. }
  77. .login-title {
  78. border-top-left-radius: 8px;
  79. border-top-right-radius: 8px;
  80. padding: 20px 10px;
  81. background-color: rgba(0, 0, 0, .6);
  82. }
  83. .login-title h1 {
  84. margin-top: 10px !important;
  85. }
  86. .login-title small {
  87. color: #fff;
  88. }
  89. .link p {
  90. line-height: 20px;
  91. margin-top: 30px;
  92. }
  93. .btn-sm {
  94. padding: 8px 24px !important;
  95. font-size: 16px !important;
  96. }
  97. .flag {
  98. position: absolute;
  99. top: 10px;
  100. right: 10px;
  101. color: #fff;
  102. font-weight: bold;
  103. font: 14px/normal "microsoft yahei", "Times New Roman", "宋体", Times, serif;
  104. }
  105. </style>
  106. <title>${config_siteConfig.cfgCompanyName}</title>
  107. </head>
  108. <body>
  109. <div class="box">
  110. <div class="login-box">
  111. <div class="login-title text-center">
  112. <span class="flag"><i class="fa fa-user"></i> 登陆</span>
  113. <h1>
  114. <small>车闸管理系统</small>
  115. </h1>
  116. </div>
  117. <div class="login-content ">
  118. <div class="form">
  119. <form id="modifyPassword" class="form-horizontal" action="loginlogin.action" method="post" enctype="multipart/form-data">
  120. <input type="hidden" id="referer" name="referer" value="${param.referer}">
  121. <div class="form-group">
  122. <div class="col-xs-10 col-xs-offset-1">
  123. <div class="input-group">
  124. <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
  125. <input type="text" id="username" name="account" class="form-control" placeholder="账号"
  126. >
  127. </div>
  128. </div>
  129. </div>
  130. <div class="form-group">
  131. <div class="col-xs-10 col-xs-offset-1">
  132. <div class="input-group">
  133. <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
  134. <input type="password" id="password" name="password" class="form-control"
  135. placeholder="密码" >
  136. </div>
  137. </div>
  138. </div>
  139. <div class="form-group form-actions">
  140. <div class="col-xs-12 text-center">
  141. <button type="submit" id="login" class="btn btn-sm btn-success">
  142. <span class="fa fa-check-circle"></span> 登录
  143. </button>
  144. <button type="button" id="reset" class="btn btn-sm btn-danger">
  145. <span class="fa fa-close"></span> 重置
  146. </button>
  147. </div>
  148. </div>
  149. </form>
  150. <h5 style="text-align: center; color: #4682B4; font-weight: 700;margin-left: -2%; margin-top: 7%">@南昌交通学院</h5>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  156. <div class="modal-dialog modal-sm" role="document">
  157. <div class="modal-content">
  158. <div class="modal-body">
  159. <span class="text-danger"><i class="fa fa-warning"></i> 用户名或密码错误,请重试!</span>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <!-- 引入jQuery -->
  165. <script src="../static/plugins/jquery/jquery.min.js"></script>
  166. <script src="../static/plugins/jquery/jquery.cookie.js"></script>
  167. <script src="../static/plugins/bootstrap/js/bootstrap.min.js"></script>
  168. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  169. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  170. <!--[if lt IE 9]-->
  171. <!-- <script src="./static/plugins/bootstrap/plugins/html5shiv.min.js"></script>
  172. <script src="./static/plugins/bootstrap/plugins/respond.min.js"></script> -->
  173. <!-- [endif]-->
  174. <script type="text/javascript">
  175. if (navigator.appName == "Microsoft Internet Explorer" &&
  176. (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE6.0" ||
  177. navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE7.0" ||
  178. navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0")
  179. ) {
  180. alert("您的浏览器版本过低,请使用360安全浏览器的极速模式或IE9.0以上版本的浏览器");
  181. }
  182. </script>
  183. <script>
  184. var _hmt = _hmt || [];
  185. (function () {
  186. var hm = document.createElement("script");
  187. hm.src = "https://hm.baidu.com/hm.js?9bbb7536a0474a4ad060a6fdc8a678b5";
  188. var s = document.getElementsByTagName("script")[0];
  189. s.parentNode.insertBefore(hm, s);
  190. })();
  191. </script>
  192. <script type="text/javascript">
  193. $(function () {
  194. if(!${erro == null}){
  195. $('#myModal').modal();
  196. }
  197. /* */
  198. /*$('#password').keyup(function (event) {
  199. if (event.keyCode == "13") {
  200. $("#login").trigger("click");
  201. return false;
  202. }
  203. });
  204. $("#login").on("click", function () {
  205. submitForm();
  206. });
  207. function submitForm() {
  208. if (navigator.appName == "Microsoft Internet Explorer" &&
  209. (navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE6.0" ||
  210. navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE7.0" ||
  211. navigator.appVersion.split(";")[1].replace(/[ ]/g, "") == "MSIE8.0")
  212. ) {
  213. alert("您的浏览器版本过低,请使用360安全浏览器的极速模式或IE9.0以上版本的浏览器");
  214. } else {
  215. var formData = {
  216. username: $('#username').val(),
  217. password: $('#password').val(),
  218. referer: $('#referer').val()
  219. };
  220. $.ajax({
  221. type: 'POST',
  222. url: '/json/response/login.json',
  223. contentType: "application/json; charset=utf-8",
  224. data: JSON.stringify(formData),
  225. success: function (data) {
  226. if (data.statusCode == 200) {
  227. //location.href = '/system/index/index?portal=${portal}';
  228. location.href = data.referer;
  229. } else {
  230. $('#myModal').modal();
  231. //alert("用户名或密码错误!");
  232. }
  233. },
  234. error: function () {
  235. }
  236. });
  237. }
  238. }*/
  239. $("#reset").on("click", function () {
  240. $("#username").val("");
  241. $("#password").val("");
  242. });
  243. });
  244. </script>
  245. </body>
  246. </html>