index.htm 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>${projectTitle!}</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <link rel="stylesheet" href="/admin/assets/css/bootstrap.min.css" />
  8. <link rel="stylesheet" href="/admin/assets/css/font-awesome.min.css" />
  9. <link rel="stylesheet" href="/admin/assets/css/ace.min.css" />
  10. <link rel="stylesheet" href="/admin/assets/css/ace-rtl.min.css" />
  11. <link rel="stylesheet" href="/admin/css/style.css" />
  12. <script src="/admin/script/jquery.min.js"></script>
  13. <script src="/admin/script/jquery.form.js"></script>
  14. </head>
  15. <body class="login-layout">
  16. <div class="navbar navbar-default">
  17. <div class="navbar-container">
  18. <div class="navbar-header pull-left">
  19. <a href="/admin/dashboard" class="navbar-brand"><small><i class="icon-home"></i><span style="margin-left: 10px;">${projectTitle!}</span></small></a>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="main-container">
  24. <div class="main-content">
  25. <div class="row">
  26. <div class="col-sm-10 col-sm-offset-1">
  27. <div class="login-container">
  28. <div class="position-relative" style="margin-top:100px;">
  29. <div id="login-box" class="login-box visible widget-box no-border">
  30. <div class="widget-body">
  31. <div class="widget-main">
  32. <h4 class="header blue lighter bigger">
  33. <i class="icon-coffee green"></i>
  34. 请输入账号和密码进行登录
  35. </h4>
  36. <div class="space-6"></div>
  37. <form action="/admin/login" method="post" id="login_form">
  38. <fieldset>
  39. <label class="block clearfix">
  40. <span class="block input-icon input-icon-right">
  41. <input type="text" class="form-control" name="name" />
  42. <i class="icon-user"></i>
  43. </span>
  44. </label>
  45. <label class="block clearfix">
  46. <span class="block input-icon input-icon-right">
  47. <input type="password" class="form-control" name="password" />
  48. <i class="icon-lock"></i>
  49. </span>
  50. </label>
  51. <label class="block clearfix">
  52. <span class="block input-icon input-icon-right" style="float: left;">
  53. <input type="text" class="form-control" name="code" />
  54. </span>
  55. <span style="float: left;margin-left: 5px;">
  56. <img src="/admin/code" class="yzm_img" style="height:30px;max-width: 80px;" onclick="changeCode(this)" id="changeCode" />
  57. </span>
  58. </label>
  59. <div class="space"></div>
  60. <div class="clearfix">
  61. <button type="button" class="width-35 pull-right btn btn-info btn-sm" onclick="return submitForm()">
  62. <i class="icon-key"></i>
  63. 登陆
  64. </button>
  65. </div>
  66. <div class="space-4"></div>
  67. </fieldset>
  68. </form>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <script>
  79. function submitForm(){
  80. $('#login_form').ajaxSubmit({
  81. success: function(data){
  82. if(data.success){
  83. window.location.href="/admin/dashboard";
  84. }else{
  85. $(".yzm_img").attr("src", "/admin/code?t="+Math.random());
  86. alert(data.msg);
  87. }
  88. }
  89. });
  90. return false;
  91. }
  92. function changeCode(obj){
  93. $(obj).attr("src", "/admin/code?t="+Math.random());
  94. }
  95. </script>
  96. </body>
  97. </html>