| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <!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" />
- <link href="./css/bootstrap.min.css" rel="stylesheet">
- <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
- <link href="./css/animate.min.css" rel="stylesheet">
- <link href="./css/style.min.css" rel="stylesheet">
- <link href="./css/login.min.css" rel="stylesheet">
- <script src="./js/jquery.min.js?v=2.1.4"></script>
- <script src="./js/jquery.cookie.js"></script>
- <script src="Script/Common/huayi.load.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- </head>
- <body class="signin">
- <div class="signinpanel">
- <div class="d_left" style="width: 55%;">
- <div class="lg_boxs"> <img src="./img/lg.png" alt="" /></div>
- </div>
- <div class=" d_right" style="width: 45%;">
- <form class="dl_form" method="get">
- <div class="hj_box"> <img class=" hj" src="./img/hj.png" alt="" /></div>
- <div class="user iut">
- <i class="i1 us"></i>
- <input type="text" placeholder="请输入管理账号" id="user">
- <i class="ts user_ts"></i>
- </div>
- <div class="fj iut">
- <i class="i1 yz"></i>
- <input type="text" placeholder="请输入分机号" id="fj">
- <i class="ts fj_ts"></i>
- </div>
- <div class="password iut">
- <i class="i1 ps"></i>
- <input type="password" placeholder="请输入密码" id="password">
- <i class="ts password_ts"></i>
- </div>
- <div class="b_box">
- <div class="btns" type="button">登录</div>
- </div>
- <h3 class="t_bootm">技术服务热线:400-637-1311</h3>
- <div class="Downlone_">
- <a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a>
- <a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a>
- <a href="ExeWork/vcredist_x86.exe">安装异常补充包</a>
- </div>
- </form>
-
- </div>
- </div>
- <script>
- $(function() {
- /*输入框样式改变*/
- $("#user").focus(function() {
- $(this).parent().addClass("_success");
- });
- $("#user").blur(function() {
- $(this).parent().removeClass("_success");
- })
- $("#fj").focus(function() {
- $(this).parent().addClass("_success");
- });
- $("#fj").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")); //用户名
- $("#fj").val($.cookie("fj"));
- }
- //键盘事件
- document.onkeydown = function(e) {
- var theEvent = window.event || e;
- var code = theEvent.keyCode || theEvent.which;
- if(code == 13) {
- $(".btns").click();
- }
- }
- $(".btns").click(function() {
- var User = $("#user").val();
- var Fj = $("#fj").val();
- var Password = $("#password").val();
- /*保存COOK*/
- //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
- //$.cookie("fj", $("#fj").val(), {expires: 7,secure:true});
- /*表单验证*/
- if(User == "" || Fj == "" || Password == "") {
- $(".ts").addClass("Yz_error");
- if($("#user").val() == "") {
- $("#user").focus(function() {
- $(".user_ts").removeClass("Yz_error");
- $(".fj_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: Fj,
- password: Password
- },
- success: function(data) {
- /*验证请求*/
- if(data.state == "success") {
- $.cookie("token", data.data.token, {
- expires: 7
- });
- $.cookie("extno", Fj, {
- expires: 7
- });
- window.location.href = "index.html";
- } else {
- //alert("登录失败");
- $("#user").val('');
- $("#fj").val('');
- $("#password").val('');
- }
- }
- });
- }
- });
- });
- /*点击提交*/
- /*cook*/
- </script>
- </body>
- </html>
|