index.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. {__NOLAYOUT__}<!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>A3Mall | Dashboard</title>
  7. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  8. <link rel="stylesheet" href="{__SYSTEM_PATH__}/js/bootstrap/css/bootstrap.min.css">
  9. <script src="{__SYSTEM_PATH__}/js/jquery/jquery.min.js"></script>
  10. <script src="{__SYSTEM_PATH__}/js/layui/layui.all.js"></script>
  11. <script src="{__SYSTEM_PATH__}/js/common/common.js"></script>
  12. <style type="text/css">
  13. input,button { outline:none; }
  14. ::-webkit-input-placeholder {
  15. color: #999;
  16. font-size: 15px;
  17. }
  18. ::-moz-placeholder {
  19. color: #999;
  20. font-size: 15px;
  21. }
  22. :-ms-input-placeholder {
  23. color: #999;
  24. font-size: 15px;
  25. }
  26. body { background-color: #3c8dbc; }
  27. #header { width: 100%; height: 90px; line-height: 90px; border-bottom: 1px solid #80b5d3; }
  28. .wrap { width: 1200px; margin: 0 auto; }
  29. .wrap h1 { float: left; font-size: 42px; color: #fff; }
  30. #main { width: 100%; }
  31. #main .wrap { margin-top: 60px; height: 476px; background: url({__SYSTEM_PATH__}/images/login-bg.png) no-repeat left center; }
  32. .form-box { float: right; margin-top: 20px; width: 440px; height: 430px; background-color: #fff; border-radius: 10px; }
  33. .form-tips { height: 88px; line-height: 88px; color: #2d83b5; font-size: 22px; text-align: center; width: 100%; }
  34. .form-fields { margin: 0 auto; margin-bottom: 30px; width: 370px; height: 48px; }
  35. .form-fields input { text-indent: 15px; width: 370px; height: 48px; border: 0; border-radius: 5px; background-color: #f5f6f8; font-size: 15px; color: #333; }
  36. .form-fields-code input { width: 210px; }
  37. .form-fields-code img { cursor: pointer; width: 150px; height: 48px; float: right; }
  38. .form-button { width: 370px; height: 48px; margin: 0 auto; }
  39. .form-button button { border: 0; background-color: #3084b5; width: 370px; height: 48px; border-radius: 5px; color: #fff; font-size: 17px; }
  40. .form-button button:hover { opacity: 0.8; }
  41. .form-button button.disable { color: #666; background-color: #eee; cursor:no-drop; }
  42. .copyright { width: 100%; font-size: 14px; color: #fff; text-align: center; position: absolute; left: 0; bottom: 10px; }
  43. .copyright a { color: #fff; font-size: 14px; }
  44. .copyright a:hover { text-decoration: underline; }
  45. .gov-icon { padding-left: 25px; background: url({__STATIC_PATH__}/images/yui_123.png) no-repeat; }
  46. </style>
  47. </head>
  48. <body>
  49. <div id="header">
  50. <div class="wrap">
  51. <h1>A3Mall</h1>
  52. </div>
  53. </div>
  54. <div id="main">
  55. <div class="wrap">
  56. <div class="form-box">
  57. <div class="form-tips">欢迎使用A3Mall商城系统!</div>
  58. <form id="theForm" method="post">
  59. <div class="form-fields">
  60. <input type="text" name="username" placeholder="用户名" autocomplete="off">
  61. </div>
  62. <div class="form-fields">
  63. <input type="password" name="password" placeholder="密码" autocomplete="off">
  64. </div>
  65. <div class="form-fields form-fields-code">
  66. <input type="text" name="code" maxlength="4" placeholder="验证码" autocomplete="off">
  67. <img src="{:url('login/verify')}" alt="code">
  68. </div>
  69. <div class="form-button">
  70. <button type="button">登 录</button>
  71. </div>
  72. </form>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="copyright">
  77. <span>Copyright 2020-<?php echo date("Y"); ?> <a href="http://www.a3-mall.com/" target="_blank">A3MALL</a>. All Rights Reserved.</span>
  78. {if isset($data.is_admin) && $data.is_admin==1}
  79. {if !empty($data.icp)}&nbsp;&nbsp;<span>备案信息:<a target="_blank" href="https://beian.miit.gov.cn/">{$data.icp|default=''}</a></span>{/if}
  80. {if !empty($data.gov_record)}&nbsp;&nbsp;<span class="gov-icon"><a target="_blank" href="{$data.gov_link|default=''}">公安备案:{$data.gov_record|default=''}</a></span>{/if}
  81. {if !empty($data.supervision_url)}&nbsp;&nbsp;<span>{$data.supervision_url|default=''}</span>{/if}
  82. {/if}
  83. </div>
  84. <script type="text/javascript">
  85. $('[name="username"]').focus();
  86. layui.use(["layer"],function(){
  87. var layer = layui.layer;
  88. $('[alt="code"]').on("click",function (){
  89. var timenow = new Date().getTime();
  90. var url = "{:createUrl('verify')}" + '?t=' + timenow;
  91. $(this).attr('src', url);
  92. });
  93. $(document).keypress(function(e) {
  94. if (e.ctrlKey && e.which == 13 || e.which == 10) {
  95. $('[type="button"]').click();
  96. document.body.focus();
  97. } else if (e.shiftKey && e.which == 13 || e.which == 10) {
  98. $('[type="button"]').click();
  99. } else if (e.which == 13) {
  100. $('[type="button"]').click();
  101. }
  102. });
  103. $('[type="button"]').on("click",function (){
  104. var that = $(this);
  105. if($(that).is(".disable")){
  106. return false;
  107. }
  108. $(that).addClass("disable");
  109. $.post('{:createUrl("login/post")}',$("#theForm").serialize(),function(result){
  110. if(result.code){
  111. layer.msg(result.msg, { time:3000 },function (){
  112. window.location.href = result.data;
  113. });
  114. }else{
  115. layer.msg(result.msg);
  116. $(that).removeClass("disable");
  117. $('[alt="code"]').trigger("click");
  118. }
  119. },"json");
  120. return false;
  121. });
  122. });
  123. </script>
  124. </body>
  125. </html>