| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <!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" />
- <script src="Script/Common/huayi.load.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="css/initialize.css" />
- <link rel="shortcut icon" href="img/32.ico" />
- <link href="./css/login.css" rel="stylesheet">
- <script src="./js/jquery.md5.js"></script>
- <script src="./js/aes/crypto-js.js"></script>
- <!--[if lt IE 9]>
- <meta http-equiv="refresh" content="0;ie.html" />
- <![endif]-->
-
- </head>
- <body class="signin">
- <div class="head">
- <div class="headCon">
- <!-- <img src="img/logo.png" alt="" style="vertical-align: middle;" /> -->
- <span class="center"></span>
- </div>
- </div>
- <div class="wrap">
- <div class="row clearfix mainCon">
- <div class="mainCon_left col-sm-7">
- <div class="img_box">
- <img src="img/xx_bg_04.png" alt="" style="vertical-align: middle;display: inline-block; width: 95%;" />
- <span class="center"></span>
- </div>
- </div>
- <div class="mainCon_right col-sm-5">
- <div class="tab_box">
- <ul class="clearfix tab_ul">
- <li class="active">坐席登录</li>
- <li>用户登录</li>
- </ul>
- <div class="tab_content">
- <div class="tab_one">
- <p>
- <i class="login_icon login_icon_user "></i>
- <input class="zx_user" type="text" placeholder="请输入您的账号" />
- <i class="login_icon error error_zx error_zx_user"></i>
- </p>
- <p>
- <i class="login_icon login_icon_hua "></i>
- <input class="zx_fj" type="text" placeholder="请输入分机号" />
- <i class="login_icon error error_zx error_zx_fj"></i>
- </p>
- <p>
- <i class="login_icon login_icon_lock "></i>
- <input class="zx_psw" type="password" placeholder="请输入您的密码" />
- <i class="login_icon error error_zx error_zx_psw"></i>
- </p>
- <p class="login_go login_zx">登录</p>
- </div>
- <div class="tab_two" style="display: none;">
- <p>
- <i class="login_icon login_icon_user "></i>
- <input class="gl_user" type="text" placeholder="请输入您的管理账号" />
- <i class="login_icon error error_gl error_gl_user"></i>
- </p>
- <p>
- <i class="login_icon login_icon_lock"></i>
- <input class="gl_psw" type="password" placeholder="请输入您的密码" />
- <i class="login_icon error error_gl error_gl_psw"></i>
- </p>
- <p class="login_go login_gl">登录</p>
- </div>
- </div>
- </div>
- <span class="center"></span>
- </div>
- </div>
- </div>
- <div class="foot">
- <div class="footCon" style="display: inline-block; vertical-align: middle;">
- <div style="vertical-align: middle;">
- <!-- <a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a> |
- <a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a> |
- <a href="ExeWork/vcredist_x86.exe">安装异常补充包</a> |
- 技术服务热线:400-637-1311</div> -->
- <!-- <p class="Copy" style="margin-top: 13px;">Copyright©2010-2020 加一科技 版权所有 版本号 <span class="version"></span></p> -->
- </div>
- <span class="center"></span>
- </div>
- <script>
- $(function() {
- var a=0;
- $('.tab_ul li').click(function() {
- $(this).addClass("active").siblings().removeClass("active");
- var index = $(this).index();
- a=index;
- $('.tab_content').children('div').eq(index).show().siblings().hide();
-
- })
- /*cook存储数据*/
- if($.cookie("username")) {
- //取值如果存在则赋值
- console.log($.cookie("username"))
- $(".gl_user").val($.cookie("user")); //用户名
- $("zx_fj").val($.cookie("fj"));
- $(".zx_user").val($.cookie("user"));
- }
- //键盘登录事件
- $('input').bind('keypress', function(event) {
- if(event.keyCode == "13") {
- console.log(a);
- if(a == 0) {
- $('.login_zx').trigger("click");
- } else {
- $(".login_gl").trigger("click");
- }
- }
- });
- //坐席登录
- $('.login_zx').click(function(){
- console.log("坐席")
- var zx_user = $(".zx_user").val();
- var zx_fj = $(".zx_fj").val();
- var zx_psw = $(".zx_psw").val();
- if(zx_user == "" || zx_fj == "" || zx_psw == "") {
- $(".error_zx").addClass('errorShow');
- if($(".zx_user").val() == "") {
- $(".zx_user").focus(function() {
- $(".error_zx").removeClass('errorShow');
- });
- } else {
- $(".error_zx_user").removeClass('errorShow');
- }
- }else {
- var currenttime=CurentTime();
- var datatime=currenttime.split(' ')[1].split(':').join('')
- var key = CryptoJS.enc.Utf8.parse(")O[9d]6,YF}+efcaj{+8>Z'e9M"+datatime);
- var zx_psw = CryptoJS.enc.Utf8.parse($.md5(zx_psw));
- var encrypted = CryptoJS.AES.encrypt(zx_psw, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
- /*请求后台*/
- $.cookie("extno",zx_fj);
- $.cookie("zx_user",zx_user);
-
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "Login/login",
- dataType: 'json',
- async: true,
- data: {
- username: zx_user,
- extensionphone: zx_fj,
- LoginTime: currenttime,
- password: encrypted.toString() //$.md5
- },
- success: function(data) {
- /*验证请求*/
- if(data.state == "success") {
- $.cookie("token", data.data.token, {
- expires: 7
- });
- $.cookie("extno", zx_fj, {
- expires: 7
- });
- $.cookie("zx_user", zx_user, {
- expires: 7
- });
- window.location.href = "index.html";
-
- }else{
- $(".zx_user").val('');
- $(".zx_fj").val('');
- $(".zx_psw").val('');
- console.log(data);
- }
- }
- });
- }
- })
- //用户登录
- $('.login_gl').click(function() {
- console.log("用户")
- var gl_user = $(".gl_user").val();
- var gl_psw = $(".gl_psw").val();
- if(gl_user == "" || gl_psw == "") {
- $(".error_gl").addClass('errorShow');
- if($(".gl_user").val() == "") {
- $(".gl_user").focus(function() {
- $(".error_gl").removeClass('errorShow');
- });
- } else {
- $(".error_gl_user").removeClass('errorShow');
- }
- } else {
- var currenttime=CurentTime();
- var datatime=currenttime.split(' ')[1].split(':').join('')
- var key = CryptoJS.enc.Utf8.parse(")O[9d]6,YF}+efcaj{+8>Z'e9M"+datatime);
- var gl_psw = CryptoJS.enc.Utf8.parse($.md5(gl_psw));
- var encrypted = CryptoJS.AES.encrypt(gl_psw, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
- /*请求后台*/
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "Login/login",
- dataType: 'json',
- async: true,
- data: {
- username: gl_user,
- LoginTime: currenttime,
- password: encrypted.toString() //$.md5
- },
- success: function(data) {
- /*验证请求*/
- if(data.state == "success") {
- debugger;
- $.cookie("token", data.data.token, {
- expires: 7
- });
- window.location.href = "index.html";
- }else{
- $(".gl_user").val('');
- $(".gl_psw").val('');
- console.log(data.state);
- }
- }
- });
- }
- })
-
- function CurentTime(){
- var now = new Date();
-
- var year = now.getFullYear(); //年
- var month = now.getMonth() + 1; //月
- var day = now.getDate(); //日
-
- var hh = now.getHours(); //时
- var mm = now.getMinutes(); //分
- var ss = now.getSeconds(); //秒
-
- var clock = year + "-";
-
- if(month < 10)
- clock += "0";
-
- clock += month + "-";
-
- if(day < 10)
- clock += "0";
-
- clock += day + " ";
-
- if(hh < 10)
- clock += "0";
-
- clock += hh + ":";
- if (mm < 10) clock += '0';
- clock += mm + ":";
- if (ss < 10) clock += '0';
- clock += ss;
- return(clock);
- }
- })
- </script>
- </body>
- </html>
|