Bez popisu

login.html 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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">
  61. <!--<h2>
  62. <i></i>
  63. <span>全客服平台</span>
  64. </h2>-->
  65. <!--<p>欢迎您进入全客服平台,开启智慧客服新篇章!</p>-->
  66. <!--<div class="left_word">
  67. <h3>用心做,更出色</h3>
  68. <p>致力于临床实验技术的普通和提高,为人类健康服务</p>
  69. </div>-->
  70. </div>
  71. <div class="signin_right col-md-5">
  72. <div class="signin_panel">
  73. <div class="logo_title">
  74. <img src="img/snLogo.png" alt=""width="50px" height="50px"/>
  75. <span>双汇客服中心管理系统</span>
  76. </div>
  77. <!--<h1>思念呼叫中心管理系统</h1>-->
  78. <div class="signin_user">
  79. <i class="signin_icons"></i>
  80. <input class="form-control" type="text" placeholder="请输入您的管理账号" id="user" autofocus autocomplete="off">
  81. <i class="ts user_ts"></i>
  82. </div>
  83. <div class="signin_seat">
  84. <i class="signin_icons"></i>
  85. <input class="form-control" type="text" placeholder="请输入分机号" id="userSeat" autocomplete="off">
  86. </div>
  87. <div class="signin_password">
  88. <i class="signin_icons"></i>
  89. <input class="form-control" type="password" placeholder="请输入您的密码" id="password" autocomplete="off">
  90. <i class="ts password_ts"></i>
  91. </div>
  92. <div class="clearfix singin_rpassword">
  93. <div class="rpassword">
  94. <label for="rpassword">
  95. <input type="checkbox" id="rpassword">
  96. <span class="checkbox_icon"></span>
  97. 记住密码
  98. </label>
  99. </div>
  100. </div>
  101. <div class="btns" type="button">登录</div>
  102. <div class="signfooter">
  103. <a href="ExeWork/LeCallCenterSetup.exe">下载客户端|</a>
  104. <a href="ExeWork/Microsoft.NET4.5.2.exe">下载安装环境|</a>
  105. <a href="ExeWork/vc_redist.x86.exe">安装包异常补充包</a>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <script>
  112. $(function () {
  113. /*输入框样式改变*/
  114. $("#user").focus(function () {
  115. $(this).parent().addClass("_success");
  116. });
  117. $("#user").blur(function () {
  118. $(this).parent().removeClass("_success");
  119. });
  120. $("#password").focus(function () {
  121. $(this).parent().addClass("_success");
  122. });
  123. $("#password").blur(function () {
  124. $(this).parent().removeClass("_success");
  125. });
  126. /*cook存储数据*/
  127. if ($.cookie("username")) {
  128. //取值如果存在则赋值
  129. $("#user").val($.cookie("user"));//用户名
  130. }
  131. $(".btns").click(function () {
  132. login();
  133. });
  134. $('input').bind('keypress', function (event) {
  135. if (event.keyCode == "13") {
  136. $('.btns').trigger("click");
  137. }
  138. });
  139. });
  140. /*点击提交*/
  141. function login() {
  142. var User = $("#user").val();
  143. var Password = $("#password").val();
  144. var userSeat = $("#userSeat").val();
  145. /*保存COOK*/
  146. //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
  147. /*表单验证*/
  148. if (!User|| !Password) {
  149. $(".ts").addClass("Yz_error");
  150. if ($("#user").val() == "") {
  151. $("#user").focus(function () {
  152. $(".user_ts").removeClass("Yz_error");
  153. $(".password_ts").removeClass("Yz_error");
  154. $(this).parent().addClass("_success");
  155. });
  156. } else {
  157. $(".user_ts").addClass("Yz_success");
  158. }
  159. } else {
  160. /*请求后台*/
  161. $.ajax({
  162. type: "post",
  163. url: huayi.config.callcenter_url + "/Login/login",
  164. dataType: 'json',
  165. async: true,
  166. data: {
  167. username: User,
  168. extensionphone: userSeat,
  169. password: Password
  170. },
  171. success: function (data) {
  172. /*验证请求*/
  173. if (data.state == "success") {
  174. $.cookie("token", data.data.token, { expires: 7 });
  175. $.cookie("extno", userSeat, { expires: 7 });
  176. window.location.href = "index.html";
  177. } else {
  178. layer.msg("登录失败");
  179. }
  180. }
  181. });
  182. }
  183. }
  184. </script>
  185. </body>
  186. </html>