ZZDianXin_UI - 郑州电信 演示

login.html 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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. <style>
  15. .signin_left{
  16. position: relative;
  17. }
  18. .left_word{
  19. position: absolute;
  20. height: 100%;
  21. width: 50%;
  22. }
  23. .left_word>div{
  24. position: absolute;
  25. right: 0;
  26. bottom: 23%
  27. }
  28. .left_word>div h2 + p{
  29. margin-top: 22.163%;
  30. margin-bottom: 22.163%;
  31. font-size: 18px;
  32. }
  33. .signin_left h3{
  34. font-size: 24px;
  35. color: #006967;
  36. margin-bottom: 2.5%;
  37. }
  38. .signin_left h3 + p{
  39. line-height: 30px;
  40. font-size: 18px;
  41. }
  42. </style>
  43. </head>
  44. <body class="signin">
  45. <div class="signin_bg row">
  46. <div class="signin_bg_left col-md-5"></div>
  47. <div class="signin_bg_mask"></div>
  48. <div class="left_word"></div>
  49. </div>
  50. <div class="container">
  51. <div class="row clearfix">
  52. <div class="signin_left col-md-5"></div>
  53. <div class="signin_right col-md-5">
  54. <div class="signin_panel">
  55. <div class="logo_title">
  56. <!--<img src="img/snLogo.png" alt=""width="50px" height="50px"/>-->
  57. <span>郑州电信呼叫中心管理系统</span>
  58. </div>
  59. <!--<h1>思念呼叫中心管理系统</h1>-->
  60. <div class="signin_user">
  61. <i class="signin_icons"></i>
  62. <input class="form-control" type="text" placeholder="请输入您的管理账号" id="user" autofocus autocomplete="off">
  63. <i class="ts user_ts"></i>
  64. </div>
  65. <div class="signin_seat">
  66. <i class="signin_icons"></i>
  67. <input class="form-control" type="text" placeholder="请输入分机号" id="userSeat" autocomplete="off">
  68. </div>
  69. <div class="signin_password">
  70. <i class="signin_icons"></i>
  71. <input class="form-control" type="password" placeholder="请输入您的密码" id="password" autocomplete="off">
  72. <i class="ts password_ts"></i>
  73. </div>
  74. <div class="clearfix singin_rpassword">
  75. <div class="rpassword">
  76. <label for="rpassword">
  77. <input type="checkbox" id="rpassword">
  78. <span class="checkbox_icon"></span>
  79. 记住密码
  80. </label>
  81. </div>
  82. </div>
  83. <div class="btns" type="button">登录</div>
  84. <div class="signfooter">
  85. <a href="ExeWork/LeCallCenterSetup.exe">下载客户端|</a>
  86. <a href="ExeWork/Microsoft.NET4.5.2.exe">下载安装环境|</a>
  87. <a href="ExeWork/vc_redist.x86.exe">安装包异常补充包</a>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <script>
  94. $(function () {
  95. /*输入框样式改变*/
  96. $("#user").focus(function () {
  97. $(this).parent().addClass("_success");
  98. });
  99. $("#user").blur(function () {
  100. $(this).parent().removeClass("_success");
  101. });
  102. $("#password").focus(function () {
  103. $(this).parent().addClass("_success");
  104. });
  105. $("#password").blur(function () {
  106. $(this).parent().removeClass("_success");
  107. });
  108. /*cook存储数据*/
  109. if ($.cookie("username")) {
  110. //取值如果存在则赋值
  111. $("#user").val($.cookie("user"));//用户名
  112. }
  113. $(".btns").click(function () {
  114. login();
  115. });
  116. $('input').bind('keypress', function (event) {
  117. if (event.keyCode == "13") {
  118. $('.btns').trigger("click");
  119. }
  120. });
  121. });
  122. /*点击提交*/
  123. function login() {
  124. var User = $("#user").val();
  125. var Password = $("#password").val();
  126. var userSeat = $("#userSeat").val();
  127. /*保存COOK*/
  128. //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
  129. /*表单验证*/
  130. if (!User|| !Password) {
  131. $(".ts").addClass("Yz_error");
  132. if ($("#user").val() == "") {
  133. $("#user").focus(function () {
  134. $(".user_ts").removeClass("Yz_error");
  135. $(".password_ts").removeClass("Yz_error");
  136. $(this).parent().addClass("_success");
  137. });
  138. } else {
  139. $(".user_ts").addClass("Yz_success");
  140. }
  141. } else {
  142. /*请求后台*/
  143. $.ajax({
  144. type: "post",
  145. url: huayi.config.callcenter_url + "/Login/login",
  146. dataType: 'json',
  147. async: true,
  148. data: {
  149. username: User,
  150. extensionphone: userSeat,
  151. password: Password
  152. },
  153. success: function (data) {
  154. /*验证请求*/
  155. if (data.state == "success") {
  156. $.cookie("token", data.data.token, { expires: 7 });
  157. $.cookie("extno", userSeat, { expires: 7 });
  158. window.location.href = "index.html";
  159. } else {
  160. layer.msg("登录失败");
  161. }
  162. }
  163. });
  164. }
  165. }
  166. </script>
  167. </body>
  168. </html>