index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/html">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>安全猫官网</title>
  7. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  8. <!-- Bootstrap 3.3.7 -->
  9. <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/layui/css/layui.css">
  10. <link rel="stylesheet" href="{$Think.USER_SITE_ROOT}/css/admin.css">
  11. <link rel="stylesheet" href="{$Think.USER_SITE_ROOT}/iconfont/iconfont.css">
  12. <script src="{$Think.PLUGINS_SITE_ROOT}/jquery-2.1.4.min.js"></script>
  13. <script src="{$Think.USER_SITE_ROOT}/js/admin.js"></script>
  14. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/layui/layui.js"></script>
  15. <script type="text/javascript">
  16. var BASESITEROOT = "{$Think.BASE_SITE_ROOT}";
  17. var ADMINSITEROOT = "{$Think.ADMIN_SITE_ROOT}";
  18. var BASESITEURL = "{$Think.BASE_SITE_URL}";
  19. var HOMESITEURL = "{$Think.HOME_SITE_URL}";
  20. var ADMINSITEURL = "{$Think.ADMIN_SITE_URL}";
  21. </script>
  22. </head>
  23. <style type="text/css">
  24. .layui-tab {
  25. position: absolute;
  26. left: 0;
  27. top: 0;
  28. height: 100%;
  29. width: 100%;
  30. z-index: 10;
  31. margin: 0;
  32. border: none;
  33. overflow: hidden;
  34. }
  35. .layui-tab-content {
  36. padding: 0;
  37. height: 100%;
  38. }
  39. .layui-tab-item {
  40. height: 100%;
  41. }
  42. .treeview .admin-nav-item{
  43. color: #a7b1c2 !important;
  44. padding-left: 5px;
  45. }
  46. .treeview .admin-nav-item:hover{
  47. color: #fff !important;
  48. }
  49. div.login_body{
  50. margin-top: -90px;
  51. }
  52. div.login_content div{
  53. margin-top: 30px;
  54. }
  55. ul#nav{
  56. float: right;
  57. }
  58. ul#nav a{
  59. font-size: 16px;
  60. color: black;
  61. margin-left: 20px;
  62. margin-right: 20px;
  63. }
  64. </style>
  65. <div class="admincp-header" style="line-height: 4;">
  66. <div class="logo">
  67. <a href="/index.php"><img width="200" src="{$Think.USER_SITE_ROOT}/images/backlogo.png"/></a>
  68. </div>
  69. <div class="navbar">
  70. <ul class="fr" style="float:right" id="nav">
  71. <a href="{:url('Login/index')}">{$Think.lang.login}</a>
  72. <a href="{:url('Register/index')}">{$Think.lang.register}</a>
  73. </ul>
  74. </div>
  75. </div>
  76. <div class="login">
  77. <div class="login_body">
  78. <div class="login_header">
  79. <img style="margin: 0px auto; display: block; margin-bottom: 10px;" src="{$Think.ADMIN_SITE_ROOT}/images/logo.png"/>
  80. </div>
  81. <div class="login_content">
  82. <form method="post">
  83. <div class="form-group">
  84. <input type="text" name="user_email" placeholder="{:lang('email_address')}" required class="text">
  85. </div>
  86. <div class="form-group">
  87. <input type="text" name="user_password" id="user_password" placeholder="{:lang('install_pasword')}" required class="text">
  88. <div id="pwd" style="font-size: 10px;color:#aaa;margin-top: 0;">{:lang('register_password_point')}</div>
  89. </div>
  90. <div class="form-group">
  91. <input type="text" id="confirm_password" name="confirm_password" placeholder="{:lang('confirm_password')}" required class="text">
  92. <div id="confirm_pwd"></div>
  93. </div>
  94. <div class="form-group">
  95. <input type="text" id="user_phone" name="user_phone" placeholder="{:lang('phone')}" required class="text">
  96. <div id="phone"></div>
  97. </div>
  98. <div class="form-group">
  99. <select name="user_type" id="" style="height: 38px;line-height: 38px;width: 96%;border-color: #E6E6E6;">
  100. <option value>请选择</option>
  101. <option value="1">个人用户</option>
  102. <option value="2">企业用户</option>
  103. </select>
  104. <!--<input type="text" id="user_type" name="user_type" placeholder="{:lang('user_type')}" required class="text">-->
  105. <!--<div id="type"></div>-->
  106. </div>
  107. <div class="form-group" style="margin-top: 60px;">
  108. <input type="text" name="captcha" placeholder="{:lang('login_captcha')}" required class="text" style="width:60%;float:left;">
  109. <img src="{:captcha_src()}" style="width:30%;height:38px;" id="change_captcha"/>
  110. </div>
  111. <input type="checkbox" name="ch_box" id="ch_box" onclick="c_box()" />我已阅读并同意<a>《用户协议》</a>及<a>《法律声明及隐私条款》</a><br><br>
  112. <div class="form-group" style="text-align: center;">
  113. <input type="submit" class="layui-btn" id="layui-btn" value="{:lang('register_sumbit')}" lay-submit lay-filter="login" style="margin-top:-20px; "/>
  114. </div>
  115. </form>
  116. </div>
  117. </div>
  118. </div>
  119. <script>
  120. //密码 校验
  121. $("#user_password").blur(function(){
  122. var password = document.getElementById("user_password").value;
  123. //console.log(password);
  124. var patrn=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,20}$/;
  125. if (!patrn.exec(password)){
  126. //console.log(1);
  127. // var addhtml = document.getElementById("pwd");
  128. // if(document.getElementById("tishi") == null){
  129. // addhtml.innerHTML = addhtml.innerText+'<span id="tishi" style="color:red;font-size: 12px;"><br>密码不合法</span>';
  130. // }
  131. document.getElementById("user_password").style.borderColor = "red";
  132. document.getElementById("layui-btn").type = "button";
  133. }else{
  134. //console.log(2);
  135. // var remove = document.getElementById("tishi");
  136. // remove.parentNode.removeChild(remove);
  137. document.getElementById("user_password").style.borderColor = "#e6e6e6";
  138. if(document.getElementById("confirm_password").style.borderColor != "red" && document.getElementById("user_phone").style.borderColor != "red"){
  139. document.getElementById("layui-btn").type = "submit";
  140. }
  141. }
  142. });
  143. $("#confirm_password").blur(function(){
  144. var password = document.getElementById("confirm_password").value;
  145. //console.log(password);
  146. var patrn=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,20}$/;
  147. if (!patrn.exec(password)){
  148. //console.log(1);
  149. // var addhtml = document.getElementById("confirm_pwd");
  150. // if(document.getElementById("tishi_pwd") == null){
  151. // addhtml.innerHTML = addhtml.innerText+'<span id="tishi_pwd" style="color:red;font-size: 12px;"><br>密码不合法</span>';
  152. // }
  153. document.getElementById("confirm_password").style.borderColor = "red";
  154. document.getElementById("layui-btn").type = "button";
  155. }else{
  156. // var remove = document.getElementById("tishi_pwd");
  157. // remove.parentNode.removeChild(remove);
  158. document.getElementById("confirm_password").style.borderColor = "#e6e6e6";
  159. if(document.getElementById("user_password").style.borderColor != "red" && document.getElementById("user_phone").style.borderColor != "red"){
  160. document.getElementById("layui-btn").type = "submit";
  161. }
  162. }
  163. });
  164. //电话校验
  165. $("#user_phone").blur(function(){
  166. var password = document.getElementById("user_phone").value;
  167. //console.log(password);
  168. var patrn=/^1[3456789]\d{9}$/;
  169. if (!patrn.exec(password)){
  170. // var addhtml = document.getElementById("phone");
  171. // if(document.getElementById("tishi_phone") == null){
  172. // addhtml.innerHTML = addhtml.innerText+'<span id="tishi_phone" style="color:red;font-size: 12px;"><br>电话号码不合法</span>';
  173. // }
  174. document.getElementById("user_phone").style.borderColor = "red";
  175. document.getElementById("layui-btn").type = "button";
  176. }else{
  177. // var remove = document.getElementById("tishi_phone");
  178. // remove.parentNode.removeChild(remove);
  179. document.getElementById("user_phone").style.borderColor = "#e6e6e6";
  180. if(document.getElementById("user_password").style.borderColor != "red" && document.getElementById("confirm_password").style.borderColor != "red"){
  181. document.getElementById("layui-btn").type = "submit";
  182. }
  183. }
  184. });
  185. // 协议 校验
  186. function c_box(){
  187. var c_b = document.getElementById("ch_box");
  188. var c_sub = document.getElementById("layui-btn");
  189. if(c_b.checked){
  190. c_sub.disabled=false;
  191. }else{
  192. c_sub.disabled=true;
  193. }
  194. }
  195. $('#change_captcha').click(function () {
  196. $(this).attr('src', '{:captcha_src()}?'+(new Date().getTime()));
  197. });
  198. </script>
  199. <script type="text/javascript">
  200. var width =document.body.clientWidth;
  201. var changesmall =function(){
  202. if($(".admincp-container-left").css("width")=="200px"){
  203. $(".admincp-container-left").css("width","55px");
  204. $("#layout-center").css({"position":"absolute","left":"55px","width":(width-55)+"px"});
  205. $(".title").attr('title',$(".title .title-txt").html())
  206. $(".title .title-txt").css("display","none");
  207. $('.admincp-container-right').css("left","55px");
  208. }else{
  209. $(".admincp-container-left").css("width","200px");
  210. $("#layout-center").css({"position":"absolute","left":"130px","width":(width-130)+"px"});
  211. $(".title").attr('title',"")
  212. $(".title span").css("display","inline-block");
  213. $('.admincp-container-right').css("left","200px");
  214. }
  215. }
  216. </script>
  217. <script type="text/javascript">
  218. layui.use(['jquery', 'element', 'layer'], function () {
  219. var $ = layui.jquery, element = layui.element, layer = layui.layer;
  220. $('.layui-tab-content').height($(window).height() - 145);
  221. var tab = {
  222. add: function (title, url, id) {
  223. element.tabAdd('dsTab', {
  224. title: title,
  225. content: '<iframe width="100%" height="100%" lay-id="' + id + '" frameborder="0" src="' + url + '" scrolling="yes" class="x-iframe"></iframe>',
  226. id: id
  227. });
  228. }, change: function (id) {
  229. element.tabChange('dsTab', id);
  230. }
  231. };
  232. $('.admin-nav-item').click(function (event) {
  233. var that = $(this);
  234. if ($('iframe[src="' + that.attr('href') + '"]')[0]) {
  235. tab.change(that.attr('data-id'));
  236. event.stopPropagation();
  237. return false;
  238. }
  239. if ($('iframe').length == 20) {
  240. layer.msg('最多可打开20个标签页');
  241. return false;
  242. }
  243. that.css({color: '#fff'});
  244. tab.add(that.text(), that.attr('href'), that.attr('data-id'));
  245. tab.change(that.attr('data-id'));
  246. event.stopPropagation();
  247. return false;
  248. });
  249. $(document).on('click', '.layui-tab-close', function () {
  250. $('.layui-nav-child a[data-id="' + $(this).parent('li').attr('lay-id') + '"]').css({color: 'rgba(255,255,255,.7)'});
  251. });
  252. });
  253. $('#gloMenu').on('click', '#navT', function () {
  254. var parent = $(this).closest('li');
  255. var index = parent.index();
  256. if (parent.find('#navC').find('li').length) {
  257. if (parent.hasClass('open')) {
  258. parent.find('#navC').stop(true).slideUp(300, function () {
  259. parent.removeClass('open')
  260. });
  261. } else {
  262. var openLi = $('.sidebar-menu').find('li.open');
  263. openLi.removeClass('open').find('#navC').stop(true).slideUp(300);
  264. parent.addClass('open').find('#navC').stop(true).slideDown(300);
  265. }
  266. }
  267. })
  268. $('#nav').on('click', '#nav1', function () {
  269. var parent = $(this).closest('li');
  270. var index = parent.index();
  271. if (parent.find('#nav2').find('li').length) {
  272. if (parent.hasClass('open')) {
  273. parent.find('#nav2').stop(true).slideUp(300, function () {
  274. parent.removeClass('open')
  275. });
  276. } else {
  277. var openLi = $('.sidebar-menu').find('li.open');
  278. openLi.removeClass('open').find('#nav2').stop(true).slideUp(300);
  279. parent.addClass('open').find('#nav2').stop(true).slideDown(300);
  280. }
  281. }
  282. })
  283. </script>
  284. </body>
  285. </html>