暫無描述

login.html 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  6. <title>登录</title>
  7. <meta name="keywords">
  8. <meta name="description">
  9. <meta name="renderer" content="webkit|ie-comp|ie-stand" />
  10. <link rel="shortcut icon" href="img/32.ico" />
  11. <script src="Script/Common/huayi.load.js"></script>
  12. <script src="Script/Common/huayi.config.js"></script>
  13. <link href="./css/login.css" rel="stylesheet">
  14. <!--[if lt IE 9]>
  15. <meta http-equiv="refresh" content="0;ie.html" />
  16. <![endif]-->
  17. <style>
  18. .signin_left{
  19. position: relative;
  20. }
  21. .left_word{
  22. position: absolute;
  23. height: 100%;
  24. width: 50%;
  25. }
  26. .left_word>div{
  27. position: absolute;
  28. right: 0;
  29. bottom: 23%
  30. }
  31. .left_word>div h2 + p{
  32. margin-top: 22.163%;
  33. margin-bottom: 22.163%;
  34. font-size: 18px;
  35. }
  36. .signin_left h3{
  37. font-size: 24px;
  38. color: #006967;
  39. margin-bottom: 2.5%;
  40. }
  41. .signin_left h3 + p{
  42. line-height: 30px;
  43. font-size: 18px;
  44. }
  45. </style>
  46. </head>
  47. <body class="signin">
  48. <div class="signin_bg row">
  49. <div class="signin_bg_left col-md-5"></div>
  50. <div class="signin_bg_mask"></div>
  51. <div class="left_word">
  52. <!--<div>
  53. <h3>用心做,更出色</h3>
  54. <p>致力于临床实验技术的普及和提高,为人类健康服务</p>
  55. </div>-->
  56. </div>
  57. </div>
  58. <div class="container">
  59. <div class="row clearfix">
  60. <div class="signin_left col-md-5"></div>
  61. <div class="signin_right col-md-5">
  62. <div class="signin_panel">
  63. <div class="logo_title">
  64. <img src="img/snLogo.png" alt=""width="50px" height="50px"/>
  65. <span>双汇客服中心管理系统</span>
  66. </div>
  67. <div class="signin_user">
  68. <i class="signin_icons"></i>
  69. <input class="form-control" type="text" placeholder="请输入您的管理账号" id="user" autofocus autocomplete="off">
  70. <i class="ts user_ts"></i>
  71. </div>
  72. <div class="signin_seat">
  73. <i class="signin_icons"></i>
  74. <input class="form-control" type="text" placeholder="请输入分机号" id="userSeat" autocomplete="off">
  75. </div>
  76. <div class="signin_password">
  77. <i class="signin_icons"></i>
  78. <input class="form-control" type="password" placeholder="请输入您的密码" id="password" autocomplete="off">
  79. <i class="ts password_ts"></i>
  80. </div>
  81. <div class="clearfix singin_rpassword">
  82. <div class="rpassword">
  83. <label for="rpassword">
  84. <input type="checkbox" id="rpassword">
  85. <span class="checkbox_icon"></span>
  86. 记住密码
  87. </label>
  88. </div>
  89. </div>
  90. <div class="btns" type="button">登录</div>
  91. <div class="signfooter">
  92. <a href="ExeWork/LeCallCenterSetup.exe">下载客户端|</a>
  93. <a href="ExeWork/Microsoft.NET4.5.2.exe">下载安装环境|</a>
  94. <a href="ExeWork/vc_redist.x86.exe">安装包异常补充包</a>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <script>
  101. $(function () {
  102. /*输入框样式改变*/
  103. $("#user").focus(function () {
  104. $(this).parent().addClass("_success");
  105. });
  106. $("#user").blur(function () {
  107. $(this).parent().removeClass("_success");
  108. });
  109. $("#password").focus(function () {
  110. $(this).parent().addClass("_success");
  111. });
  112. $("#password").blur(function () {
  113. $(this).parent().removeClass("_success");
  114. });
  115. /*cook存储数据*/
  116. if ($.cookie("username")) {
  117. //取值如果存在则赋值
  118. $("#user").val($.cookie("user"));//用户名
  119. }
  120. $(".btns").click(function () {
  121. login();
  122. });
  123. $('input').bind('keypress', function (event) {
  124. if (event.keyCode == "13") {
  125. $('.btns').trigger("click");
  126. }
  127. });
  128. });
  129. /*点击提交*/
  130. function login() {
  131. var User = $("#user").val();
  132. var Password = $("#password").val();
  133. var userSeat = $("#userSeat").val();
  134. /*保存COOK*/
  135. //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
  136. /*表单验证*/
  137. if (!User|| !Password) {
  138. $(".ts").addClass("Yz_error");
  139. if ($("#user").val() == "") {
  140. $("#user").focus(function () {
  141. $(".user_ts").removeClass("Yz_error");
  142. $(".password_ts").removeClass("Yz_error");
  143. $(this).parent().addClass("_success");
  144. });
  145. } else {
  146. $(".user_ts").addClass("Yz_success");
  147. }
  148. } else {
  149. /*请求后台*/
  150. $.ajax({
  151. type: "post",
  152. url: huayi.config.callcenter_url + "/Login/login",
  153. dataType: 'json',
  154. async: true,
  155. data: {
  156. username: User,
  157. extensionphone: userSeat,
  158. password: Password
  159. },
  160. success: function (data) {
  161. /*验证请求*/
  162. if (data.state == "success") {
  163. $.cookie("token", data.data.token, { expires: 7 });
  164. $.cookie("extno", userSeat, { expires: 7 });
  165. window.location.href = "index.html";
  166. } else {
  167. layer.msg("登录失败");
  168. }
  169. }
  170. });
  171. }
  172. }
  173. </script>
  174. </body>
  175. </html>