sysLogin.jsp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <!-- _login_page_ --><!--登录超时标记 勿删-->
  4. <html>
  5. <head>
  6. <meta name="decorator" content="ani"/>
  7. <title>${fns:getConfig('productName')} 登录</title>
  8. <script>
  9. if (window.top !== window.self) {
  10. window.top.location = window.location;
  11. }
  12. </script>
  13. <script type="text/javascript">
  14. $(document).ready(function() {
  15. $("#loginForm").validate({
  16. rules: {
  17. validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
  18. },
  19. messages: {
  20. username: {required: "请填写用户名."},password: {required: "请填写密码."},
  21. validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
  22. },
  23. errorLabelContainer: "#messageBox",
  24. errorPlacement: function(error, element) {
  25. error.appendTo($("#loginError").parent());
  26. }
  27. });
  28. });
  29. // 如果在框架或在对话框中,则弹出提示并跳转到首页
  30. if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0){
  31. alert('未登录或登录超时。请重新登录,谢谢!');
  32. top.location = "${ctx}";
  33. }
  34. </script>
  35. </head>
  36. <body>
  37. <div class="login-page">
  38. <div class="row">
  39. <div class="col-md-4 col-lg-4 col-md-offset-4 col-lg-offset-4">
  40. <img class="img-circle" src="${ctxStatic}/common/images/flat-avatar.png" class="user-avatar" />
  41. <h1>甲供物资领退料信息系统</h1>
  42. <sys:message content="${message}" showType="1"/>
  43. <form id="loginForm" role="form" action="${ctx}/login" method="post">
  44. <div class="form-content">
  45. <div class="form-group">
  46. <input type="text" id="username" name="username" class="form-control input-underline input-lg required" value="admin" placeholder="用户名">
  47. </div>
  48. <div class="form-group">
  49. <input type="password" id="password" name="password" value="admin" class="form-control input-underline input-lg required" placeholder="密码">
  50. </div>
  51. <c:if test="${isValidateCodeLogin}">
  52. <div class="form-group text-muted">
  53. <label class="inline"><font color="white">验证码:</font></label>
  54. <sys:validateCode name="validateCode" inputCssStyle="margin-bottom:5px;" buttonCssStyle="color:white"/>
  55. </div>
  56. </c:if>
  57. <ul class="pull-right btn btn-info btn-circle" style="background-color:white;height:45px;width:46px">
  58. <li class="dropdown color-picker" >
  59. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
  60. <span><i class="fa fa-circle"></i></span>
  61. </a>
  62. <ul class="dropdown-menu pull-right animated fadeIn" role="menu">
  63. <li class="padder-h-xs">
  64. <table class="table color-swatches-table text-center no-m-b">
  65. <tr>
  66. <td class="text-center colorr">
  67. <a href="#" data-theme="blue" class="theme-picker">
  68. <i class="fa fa-circle blue-base"></i>
  69. </a>
  70. </td>
  71. <td class="text-center colorr">
  72. <a href="#" data-theme="green" class="theme-picker">
  73. <i class="fa fa-circle green-base"></i>
  74. </a>
  75. </td>
  76. <td class="text-center colorr">
  77. <a href="#" data-theme="red" class="theme-picker">
  78. <i class="fa fa-circle red-base"></i>
  79. </a>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td class="text-center colorr">
  84. <a href="#" data-theme="purple" class="theme-picker">
  85. <i class="fa fa-circle purple-base"></i>
  86. </a>
  87. </td>
  88. <td class="text-center color">
  89. <a href="#" data-theme="midnight-blue" class="theme-picker">
  90. <i class="fa fa-circle midnight-blue-base"></i>
  91. </a>
  92. </td>
  93. <td class="text-center colorr">
  94. <a href="#" data-theme="lynch" class="theme-picker">
  95. <i class="fa fa-circle lynch-base"></i>
  96. </a>
  97. </td>
  98. </tr>
  99. </table>
  100. </li>
  101. </ul>
  102. </li>
  103. </ul>
  104. <label class="inline">
  105. <input type="checkbox" id="rememberMe" name="rememberMe" ${rememberMe ? 'checked' : ''} class="ace" />
  106. <span class="lbl"> 记住我</span>
  107. </label>
  108. </div>
  109. <input type="submit" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="登录">
  110. &nbsp;
  111. <a href="${ctx}/sys/register" class="btn btn-white btn-outline btn-lg btn-rounded progress-login">注册</a>
  112. </form>
  113. </div>
  114. </div>
  115. </div>
  116. <script>
  117. $(function(){
  118. $('.theme-picker').click(function() {
  119. changeTheme($(this).attr('data-theme'));
  120. });
  121. });
  122. function changeTheme(theme) {
  123. $('<link>')
  124. .appendTo('head')
  125. .attr({type : 'text/css', rel : 'stylesheet'})
  126. .attr('href', '${ctxStatic}/common/css/app-'+theme+'.css');
  127. //$.get('api/change-theme?theme='+theme);
  128. $.get('${pageContext.request.contextPath}/theme/'+theme+'?url='+window.top.location.href,function(result){ });
  129. }
  130. </script>
  131. <style>
  132. li.color-picker i {
  133. font-size: 24px;
  134. line-height: 30px;
  135. }
  136. .red-base {
  137. color: #D24D57;
  138. }
  139. .blue-base {
  140. color: #3CA2E0;
  141. }
  142. .green-base {
  143. color: #27ae60;
  144. }
  145. .purple-base {
  146. color: #957BBD;
  147. }
  148. .midnight-blue-base {
  149. color: #2c3e50;
  150. }
  151. .lynch-base {
  152. color: #6C7A89;
  153. }
  154. </style>
  155. </body>
  156. </html>