lockScreen.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>锁屏休息</title>
  6. <link href="__PUBLIC__/Admin/images/favicon.ico" type="image/x-icon" rel="shortcut icon">
  7. <script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.min.js"></script>
  8. <script type="text/javascript" src="__PUBLIC__/layer/layer.js"></script>
  9. <link href="__PUBLIC__/Admin/css/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  10. <style>
  11. a{
  12. font-size: 12px;
  13. color: white;
  14. }
  15. a:hover{
  16. color: white!important;
  17. }
  18. .copy{
  19. font-size: 12px;
  20. color: white;
  21. }
  22. /*lock screen*/
  23. .lock-screen {
  24. background:#02bac6 url("__PUBLIC__/Admin/img/lock-bg.jpg");
  25. background-size: cover;
  26. background-repeat: repeat;
  27. }
  28. .lock-wrapper {
  29. margin: 10% auto;
  30. max-width: 330px;
  31. }
  32. .lock-box {
  33. background: rgba(255,255,255,.3);
  34. padding: 20px;
  35. border-radius: 10px;
  36. -webkit-border-radius: 10px;
  37. position: relative;
  38. height: 200px;
  39. }
  40. .lock-wrapper img {
  41. position: absolute;
  42. left: 40%;
  43. top: -40px;
  44. border-radius: 50%;
  45. -webkit-border-radius: 50%;
  46. border: 5px solid #fff;
  47. }
  48. .lock-wrapper h1 {
  49. text-align: center;
  50. color: #fff;
  51. font-size: 18px;
  52. text-transform: uppercase;
  53. padding: 20px 0 0 0;
  54. }
  55. .lock-wrapper .locked {
  56. margin-bottom: 20px;
  57. display: inline-block;
  58. color: #026f7a;
  59. }
  60. .btn-lock,.btn-lock:hover {
  61. background: #02b5c2;
  62. color: #fff;
  63. }
  64. .lock-input {
  65. width: 83%;
  66. border: none;
  67. float: left;
  68. margin-right: 3px;
  69. }
  70. #time {
  71. width: 100%;
  72. color: #fff;
  73. font-size: 60px;
  74. margin-bottom: 80px;
  75. display: inline-block;
  76. text-align: center;
  77. font-family: 'Open Sans', sans-serif;
  78. font-weight: 300;
  79. }
  80. </style>
  81. </head>
  82. <body class="lock-screen" onload="startTime()">
  83. <div class="lock-wrapper">
  84. <div id="time"></div>
  85. <div class="lock-box text-center">
  86. <img src="/Upload/coin/dsc.png" alt="lock avatar"/>
  87. <span class="locked">锁屏保护中...</span>
  88. <div class="form-group col-lg-12">
  89. <input type="password" placeholder="输入密码" id="unlock_pass" name="pass"
  90. class="form-control lock-input">
  91. <button class="btn btn-lock" type="button" onclick="unlocka();">
  92. <i class="glyphicon glyphicon-arrow-right"></i>
  93. </button>
  94. </div>
  95. </div>
  96. </div>
  97. <script>
  98. $(document).ready(
  99. function() {
  100. $("#unlock_pass").keydown(function(event) {
  101. if (event.keyCode == 13) {
  102. unlocka();
  103. }
  104. })
  105. }
  106. );
  107. function unlocka(){
  108. var pass = $('#unlock_pass').val();
  109. if(!pass){
  110. layer.tips('输入解锁密码或者登录密码', '#unlock_pass', {
  111. tips: [1, '#02b5c2']
  112. });
  113. return;
  114. }
  115. $.post("{:U('Login/unlock')}",{pass:pass},function(data){
  116. layer.msg(data.info);
  117. if(data.url){
  118. window.location.href = data.url;
  119. }
  120. },'json');
  121. }
  122. function startTime()
  123. {
  124. var today=new Date();
  125. var h=today.getHours();
  126. var m=today.getMinutes();
  127. var s=today.getSeconds();
  128. // add a zero in front of numbers<10
  129. m=checkTime(m);
  130. s=checkTime(s);
  131. document.getElementById('time').innerHTML=h+":"+m+":"+s;
  132. t=setTimeout(function(){startTime()},500);
  133. }
  134. function checkTime(i)
  135. {
  136. if (i<10)
  137. {
  138. i="0" + i;
  139. }
  140. return i;
  141. }
  142. </script>
  143. </body>
  144. </html>