| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
- <title>登录</title>
- <meta name="keywords">
- <meta name="description">
- <meta name="renderer" content="webkit|ie-comp|ie-stand" />
- <link rel="shortcut icon" href="img/32.ico" />
- <script src="Script/Common/huayi.load.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <link href="./css/login.css" rel="stylesheet">
- <!--[if lt IE 9]>
- <meta http-equiv="refresh" content="0;ie.html" />
- <![endif]-->
-
- </head>
- <body class="signin">
- <div class="container">
- <div class="row clearfix">
- <!-- <div class="signin_left col-md-5"></div> -->
- <div class="signin_right col-md-5">
- <div class="signin_panel">
- <div class="logo_title">
- <div class="logo_img">
- <img src="img/logo_shuanghui.png" alt="" width="65px" height="50px"/>
- </div>
- <div class="logo_content">
- <div class="logo_text">
- <span>双汇售后服务管理系统</span>
- </div>
- <div class="logo_footer">
- </div>
- </div>
- </div>
- <div class="sigin_wrapper">
- <div class="signin_user">
- <i class="signin_icons"></i>
- <input class="form-control" type="text" placeholder="请输入您的管理账号" id="user" autofocus autocomplete="off">
- <i class="ts user_ts"></i>
- </div>
- <div class="signin_seat">
- <i class="signin_icons"></i>
- <input class="form-control" type="text" placeholder="请输入分机号" id="userSeat" autocomplete="off">
- </div>
- <div class="signin_password">
- <i class="signin_icons"></i>
- <i class="keyboard_icons"></i>
- <input class="form-control" type="password" placeholder="请输入您的密码" id="password" autocomplete="off">
- <i class="ts password_ts"></i>
- </div>
- <div class="clearfix singin_rpassword">
- <div class="rpassword">
- <label for="rpassword">
- <input type="checkbox" id="rpassword">
- <span class="checkbox_icon"></span>
- 记住密码
- </label>
- </div>
- </div>
- <div class="btns" type="button">登录</div>
- </div>
- <!-- <div class="signfooter">
- <a href="ExeWork/LeCallCenterSetup.exe">下载客户端|</a>
- <a href="ExeWork/Microsoft.NET4.5.2.exe">下载安装环境|</a>
- <a href="ExeWork/vc_redist.x86.exe">安装包异常补充包</a>
- </div> -->
- </div>
- </div>
- </div>
- </div>
- <script>
- $(function () {
- /*输入框样式改变*/
- $("#user").focus(function () {
- $(this).parent().addClass("_success");
- });
- $("#user").blur(function () {
- $(this).parent().removeClass("_success");
- });
- $("#password").focus(function () {
- $(this).parent().addClass("_success");
- });
- $("#password").blur(function () {
- $(this).parent().removeClass("_success");
- });
- /*cook存储数据*/
- if ($.cookie("username")) {
- //取值如果存在则赋值
- $("#user").val($.cookie("user"));//用户名
- }
- $(".btns").click(function () {
- login();
- });
- $('input').bind('keypress', function (event) {
- if (event.keyCode == "13") {
- $('.btns').trigger("click");
- }
- });
- });
- /*点击提交*/
- function login() {
- var User = $("#user").val();
- var Password = $("#password").val();
- var userSeat = $("#userSeat").val();
- /*保存COOK*/
- //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
- /*表单验证*/
- if (!User|| !Password) {
- $(".ts").addClass("Yz_error");
- if ($("#user").val() == "") {
- $("#user").focus(function () {
- $(".user_ts").removeClass("Yz_error");
- $(".password_ts").removeClass("Yz_error");
- $(this).parent().addClass("_success");
- });
- } else {
- $(".user_ts").addClass("Yz_success");
- }
- } else {
- /*请求后台*/
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "/Login/login",
- dataType: 'json',
- async: true,
- data: {
- username: User,
- extensionphone: userSeat,
- password: Password
- },
- success: function (data) {
- /*验证请求*/
- if (data.state == "success") {
- $.cookie("token", data.data.token, { expires: 7 });
- $.cookie("extno", userSeat, { expires: 7 });
- window.location.href = "index.html";
- } else {
- layer.msg("登录失败");
- }
- }
- });
- }
- }
- </script>
- </body>
- </html>
|