Sin descripción

login_old.html 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="x-ua-compatible" content="ie=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  7. <title>登录</title>
  8. <meta name="keywords">
  9. <meta name="description">
  10. <meta name="renderer" content="webkit">
  11. <link rel="shortcut icon" href="img/32.ico" />
  12. <link href="./css/bootstrap.min.css" rel="stylesheet">
  13. <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  14. <link href="./css/animate.min.css" rel="stylesheet">
  15. <link href="./css/style.min.css" rel="stylesheet">
  16. <link href="./css/login.min.css" rel="stylesheet">
  17. <script src="./Script/Common/huayi.load.js"></script>
  18. <script src="./Script/Common/huayi.config.js"></script>
  19. <script src="./js/jquery.md5.js"></script>
  20. <style>
  21. .d_left {
  22. /* background: -webkit-linear-gradient(left, rgb(164,190,225), rgb(108,129,168)); */
  23. background: rgba(162, 178, 204, .34);
  24. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#19ffffff, endColorstr=#19ffffff);
  25. height: 645px;
  26. text-align: center;
  27. display: table;
  28. float: left;
  29. }
  30. .lg_boxs {
  31. display: table-cell;
  32. vertical-align: middle
  33. }
  34. </style>
  35. <!--[if lte IE 7]>
  36. <style type="text/css">?
  37. .d_left{
  38. background-color: #fff;
  39. position:relative;
  40. overflow:hidden;
  41. }
  42. .lg_boxs{
  43. position:absolute;
  44. left:50%;top:50%;
  45. }
  46. .d_left img{
  47. position:relative;
  48. left:-98%;top:-50%;
  49. }
  50. </style>
  51. <![endif]-->
  52. </head>
  53. <body class="signin">
  54. <div class="signinpanel">
  55. <div class="d_left" style="width: 55%;">
  56. <!-- <div class="lg_boxs"> <img src="img/sqLogo.png" alt="" /></div> -->
  57. </div>
  58. <div class="d_right" style="width: 45%;">
  59. <form class="dl_form" method="get">
  60. <div class="hj_box"> <img class=" hj" src="./img/hj.png" alt="" /></div>
  61. <div class="user iut">
  62. <i class="i1 us"></i>
  63. <input type="text" placeholder="请输入管理账号" id="user">
  64. <i class="ts user_ts"></i>
  65. </div>
  66. <div class="fj iut">
  67. <i class="i1 yz"></i>
  68. <input type="text" placeholder="请输入分机号" id="fj">
  69. <i class="ts fj_ts"></i>
  70. </div>
  71. <div class="password iut">
  72. <i class="i1 ps"></i>
  73. <input type="password" placeholder="请输入密码" id="password">
  74. <i class="ts password_ts"></i>
  75. </div>
  76. <div class="b_box">
  77. <div class="btns" type="button">登录</div>
  78. </div>
  79. </form>
  80. </div>
  81. </div>
  82. <script>
  83. $(function() {
  84. /*输入框样式改变*/
  85. $("#user").focus(function() {
  86. $(this).parent().addClass("_success");
  87. });
  88. $("#user").blur(function() {
  89. $(this).parent().removeClass("_success");
  90. })
  91. $("#fj").focus(function() {
  92. $(this).parent().addClass("_success");
  93. });
  94. $("#fj").blur(function() {
  95. $(this).parent().removeClass("_success");
  96. })
  97. $("#password").focus(function() {
  98. $(this).parent().addClass("_success");
  99. });
  100. $("#password").blur(function() {
  101. $(this).parent().removeClass("_success");
  102. });
  103. /*cook存储数据*/
  104. if($.cookie("username")) {
  105. //取值如果存在则赋值
  106. $("#user").val($.cookie("user")); //用户名
  107. $("#fj").val($.cookie("fj"));
  108. }
  109. $('input').bind('keypress', function(event) {
  110. if(event.keyCode == "13") {
  111. $(".btns").trigger("click");
  112. }
  113. });
  114. $(".btns").click(function() {
  115. var User = $("#user").val();
  116. var Fj = $("#fj").val();
  117. var Password = $("#password").val();
  118. /*保存COOK*/
  119. //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
  120. //$.cookie("fj", $("#fj").val(), {expires: 7,secure:true});
  121. /*表单验证*/
  122. if(User == "" || Fj == "" || Password == "") {
  123. $(".ts").addClass("Yz_error");
  124. if($("#user").val() == "") {
  125. $("#user").focus(function() {
  126. $(".user_ts").removeClass("Yz_error");
  127. $(".fj_ts").removeClass("Yz_error");
  128. $(".password_ts").removeClass("Yz_error");
  129. $(this).parent().addClass("_success");
  130. });
  131. } else {
  132. $(".user_ts").addClass("Yz_success");
  133. }
  134. } else {
  135. /*请求后台*/
  136. $.ajax({
  137. type: "post",
  138. url: huayi.config.callcenter_url + "/Login/login",
  139. dataType: 'json',
  140. async: true,
  141. data: {
  142. username: User,
  143. extensionphone: Fj,
  144. password: $.md5(Password)
  145. },
  146. success: function(data) {
  147. /*验证请求*/
  148. if(data.state == "success") {
  149. $.cookie("token", data.data.token, {
  150. expires: 7
  151. });
  152. $.cookie("extno", Fj, {
  153. expires: 7
  154. });
  155. window.location.href = "index.html";
  156. }
  157. }
  158. });
  159. }
  160. });
  161. });
  162. /*点击提交*/
  163. /*cook*/
  164. </script>
  165. </body>
  166. </html>