index.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>{:site_name()}后台管理-登陆</title>
  6. <meta name="keywords" content="lemocms 基于thinkphp6,thinkphp,layui,easywechat框架,框架,组件">
  7. <meta name="description" content="lemocms 是一款采用 layui开发的极简后台管理框架 基于thinkphp6 ,easywechat,开发的cms后台管理系统,thinkphp,yii2,cms,php后台管理系统,cms,cms系统,restful api,thinkphp后台管理系统">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9. <meta http-equiv="Access-Control-Allow-Origin" content="*">
  10. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  11. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  12. <meta name="apple-mobile-web-app-capable" content="yes">
  13. <meta name="format-detection" content="telephone=no">
  14. <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all">
  15. <!--[if lt IE 9]>
  16. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  17. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  18. <![endif]-->
  19. <style>
  20. html, body {width: 100%;height: 100%;overflow: hidden}
  21. body {background: #000;}
  22. body:after {content:'';background-repeat:no-repeat;background-size:cover;-webkit-filter:blur(3px);-moz-filter:blur(3px);-o-filter:blur(3px);-ms-filter:blur(3px);filter:blur(3px);position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;}
  23. .layui-container {width: 100%;height: 100%;overflow: hidden;}
  24. .admin-login-background {width:360px;height:300px;position:absolute;left:50%;top:40%;margin-left:-180px;margin-top:-100px;}
  25. .logo-title {text-align:center;letter-spacing:2px;padding:14px 0;}
  26. .logo-title h1 {color:#009688;font-size:25px;font-weight:bold;}
  27. .login-form {background-color:#fff;border:1px solid #fff;border-radius:3px;padding:14px 20px;box-shadow:0 0 8px #eeeeee;}
  28. .login-form .layui-form-item {position:relative;}
  29. .login-form .layui-form-item label {position:absolute;left:1px;top:1px;width:38px;line-height:36px;text-align:center;color:#d2d2d2;}
  30. .login-form .layui-form-item input {padding-left:36px;}
  31. .captcha {width:60%;display:inline-block;}
  32. .captcha-img {display:inline-block;width:34%;float:right;}
  33. .captcha-img img {height:34px;border:1px solid #e6e6e6;height:36px;width:100%;}
  34. .copyright{font-size:12px;color: #ccc; text-align: center;}
  35. @media screen and (max-width: 320px) {
  36. .admin-login-background {
  37. width:300px;
  38. left: 59%;
  39. }
  40. }
  41. </style>
  42. </head>
  43. <body>
  44. <div id="canvas"></div>
  45. <div class="layui-container">
  46. <div class="admin-login-background">
  47. <div class="layui-form login-form">
  48. <form class="layui-form" action="">
  49. <div class="layui-form-item logo-title">
  50. <h1>{:site_name()}管理后台</h1>
  51. </div>
  52. <div class="layui-form-item">
  53. <label class="layui-icon layui-icon-username" for="username"></label>
  54. <input type="text" name="username" lay-verify="required|account" placeholder="用户名或者邮箱" autocomplete="off" class="layui-input" value="">
  55. </div>
  56. <div class="layui-form-item">
  57. <label class="layui-icon layui-icon-password" for="password"></label>
  58. <input type="password" name="password" lay-verify="required|password" placeholder="密码" autocomplete="off" class="layui-input" value="">
  59. </div>
  60. <div class="layui-form-item">
  61. <label class="layui-icon layui-icon-vercode" for="captcha"></label>
  62. <input type="text" name="captcha" lay-verify="required|captcha" placeholder="图形验证码" autocomplete="off" class="layui-input verification captcha" value="">
  63. <div class="captcha-img">
  64. <img id="captchaPic" src="{:url('verify')}?{:time()}" alt="captcha" onclick="this.src='{:url("verify")}?'+'id='+Math.random()"/>
  65. </div>
  66. </div>
  67. <div class="layui-form-item">
  68. <input type="checkbox" name="rememberMe" checked value="true" lay-skin="primary" title="记住密码">
  69. </div>
  70. <div class="layui-form-item">
  71. <button class="layui-btn layui-btn-fluid" lay-submit="" lay-filter="login">登 入</button>
  72. </div>
  73. <div class="copyright">
  74. © 2009-<?php echo date("Y");?> <a href="http://quyum.com" target="_blank">千翼科技</a> All Rights Reserved.
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. </div>
  80. <script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
  81. <script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
  82. <script src="/static/plugins/firework/firework.js" charset="utf-8"></script>
  83. <script>
  84. layui.use(['form'], function () {
  85. var form = layui.form,
  86. layer = layui.layer;
  87. // 登录过期的时候,跳出ifram框架
  88. if (top.location != self.location) top.location = self.location;
  89. // 粒子线条背景
  90. $(document).ready(function(){
  91. $("#canvas").fireworks({
  92. width: "100%",
  93. height: "100%"
  94. });
  95. });
  96. // 进行登录操作
  97. form.on('submit(login)', function (data) {
  98. data = data.field;
  99. if (data.username == '') {
  100. layer.msg('用户名不能为空');
  101. return false;
  102. }
  103. if (data.password == '') {
  104. layer.msg('密码不能为空');
  105. return false;
  106. }
  107. if (data.captcha == '') {
  108. layer.msg('验证码不能为空');
  109. return false;
  110. }
  111. $.ajax({
  112. method:'post',
  113. data:data,
  114. success:function (res) {
  115. if(res.code>0){
  116. layer.msg(res.msg, function () {
  117. window.location = "{:url('index/index')}";
  118. });
  119. }else{
  120. layer.msg(res.msg);
  121. $('#captchaPic').attr('src','{:url("verify")}?id='+Math.random());
  122. return false;
  123. }
  124. },fail:function (res) {
  125. layer.msg(res.msg, function () {
  126. $('#captchaPic').attr('src','{:url("verify")}?id='+Math.random());
  127. return false;
  128. });
  129. }
  130. });
  131. return false;
  132. });
  133. });
  134. </script>
  135. </body>
  136. </html>