|
|
@@ -3,330 +3,120 @@
|
|
3
|
3
|
|
|
4
|
4
|
<head>
|
|
5
|
5
|
<meta charset="utf-8">
|
|
|
6
|
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
6
|
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
7
|
8
|
<title>登录</title>
|
|
8
|
9
|
<meta name="keywords">
|
|
9
|
10
|
<meta name="description">
|
|
10
|
11
|
<meta name="renderer" content="webkit">
|
|
11
|
12
|
<link rel="shortcut icon" href="img/32.ico" />
|
|
|
13
|
+ <link href="./css/bootstrap.min.css" rel="stylesheet">
|
|
|
14
|
+ <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
|
|
|
15
|
+ <link href="./css/animate.min.css" rel="stylesheet">
|
|
|
16
|
+ <link href="./css/style.min.css" rel="stylesheet">
|
|
|
17
|
+ <link href="./css/login.min.css" rel="stylesheet">
|
|
12
|
18
|
<script src="./Script/Common/huayi.load.js"></script>
|
|
13
|
19
|
<script src="./Script/Common/huayi.config.js"></script>
|
|
14
|
|
- <link rel="stylesheet" href="./css/init.css" />
|
|
15
|
20
|
<script src="./js/jquery.md5.js"></script>
|
|
16
|
21
|
<script src="./js/aes/crypto-js.js"></script>
|
|
17
|
22
|
<style>
|
|
18
|
|
- html {
|
|
19
|
|
- margin: 0 auto;
|
|
20
|
|
- padding: 0;
|
|
21
|
|
- height: 100%;
|
|
22
|
|
- }
|
|
23
|
|
- body {
|
|
24
|
|
- height: 100%;
|
|
25
|
|
- background: #fff;
|
|
26
|
|
- }
|
|
27
|
|
- .wrap {
|
|
28
|
|
- width: 100%;
|
|
29
|
|
- height: 100%;
|
|
30
|
|
- }
|
|
31
|
|
- .wrap_right {
|
|
32
|
|
- float: left;
|
|
33
|
|
- width: 50%;
|
|
34
|
|
- height: 100%;
|
|
35
|
|
- }
|
|
36
|
|
- .wrap_left{
|
|
37
|
|
- float: left;
|
|
38
|
|
- width: 50%;
|
|
39
|
|
- height: 100%;
|
|
40
|
|
- }
|
|
41
|
|
- .wrap_right{
|
|
42
|
|
- position: relative;
|
|
43
|
|
- }
|
|
44
|
|
- .wrap_bj {
|
|
45
|
|
- width: 100%;
|
|
46
|
|
- height: 100%;
|
|
47
|
|
- background: url(img/left_amg_01.jpg) no-repeat;
|
|
48
|
|
- background-size: 100% 100%;
|
|
49
|
|
- }
|
|
50
|
|
- .tab_box {
|
|
51
|
|
- border: 1px solid #41caf2;
|
|
52
|
|
- border-top-right-radius: 15px;
|
|
53
|
|
- border-bottom-left-radius: 15px;
|
|
54
|
|
- margin: 50px auto 65px;
|
|
55
|
|
- padding: 0;
|
|
56
|
|
- overflow: hidden;
|
|
57
|
|
- width: 410px;
|
|
58
|
|
- }
|
|
59
|
|
- .tab_box ul {
|
|
60
|
|
- list-style: none;
|
|
61
|
|
- margin: 0;
|
|
62
|
|
- padding: 0;
|
|
63
|
|
- width: 100%;
|
|
64
|
|
- height: 50px;
|
|
65
|
|
- line-height: 50px;
|
|
66
|
|
- font-size: 16px;
|
|
67
|
|
- color: #41caf2;
|
|
68
|
|
- border-bottom: 1px solid #41caf2;
|
|
|
23
|
+ .d_left {
|
|
|
24
|
+ /* background: -webkit-linear-gradient(left, rgb(164,190,225), rgb(108,129,168)); */
|
|
|
25
|
+ background: rgba(162, 178, 204, .34);
|
|
|
26
|
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#19ffffff, endColorstr=#19ffffff);
|
|
|
27
|
+ height: 645px;
|
|
69
|
28
|
text-align: center;
|
|
70
|
|
- }
|
|
71
|
|
- .tab_box ul li {
|
|
72
|
|
- width: 50%;
|
|
|
29
|
+ display: table;
|
|
73
|
30
|
float: left;
|
|
74
|
|
- }
|
|
75
|
|
- .active {
|
|
76
|
|
- background: #41caf2;
|
|
77
|
|
- color: #fff;
|
|
78
|
|
- }
|
|
79
|
|
- .tab_content {
|
|
80
|
|
- margin: 57px 0 35px 0;
|
|
81
|
|
- }
|
|
82
|
|
- .tab_content div p {
|
|
83
|
|
- width: 80%;
|
|
84
|
|
- margin: 0 auto;
|
|
85
|
|
- height: 35px;
|
|
86
|
|
- border: 1px solid #41caf2;
|
|
87
|
|
- border-radius: 15px;
|
|
88
|
|
- margin-bottom: 25px;
|
|
89
|
|
- line-height: 30px;
|
|
90
|
|
- padding-left: 20px;
|
|
91
|
|
- }
|
|
92
|
|
- .tab_content div p input {
|
|
93
|
|
- width: 75%;
|
|
94
|
|
- border: 0;
|
|
95
|
|
- font-size: 16px;
|
|
96
|
|
- outline: none;
|
|
97
|
|
- font-family: "仿宋", "宋体";
|
|
98
|
|
- }
|
|
99
|
|
- .login_icon {
|
|
100
|
|
- display: inline-block;
|
|
101
|
|
- width: 17px;
|
|
102
|
|
- height: 19px;
|
|
103
|
|
- vertical-align: middle;
|
|
104
|
|
- margin-right: 15px;
|
|
105
|
|
- }
|
|
106
|
|
- .login_icon_user {
|
|
107
|
|
- background: url(img/login_user.png) no-repeat;
|
|
108
|
|
- }
|
|
109
|
|
- .login_icon_lock {
|
|
110
|
|
- background: url(img/login_lock.png) no-repeat;
|
|
111
|
|
- }
|
|
112
|
|
- .login_icon_hua {
|
|
113
|
|
- background: url(img/login_hua.png) no-repeat;
|
|
114
|
|
- }
|
|
115
|
|
- .login_go {
|
|
116
|
|
- text-align: center;
|
|
117
|
|
- padding: 0!important;
|
|
118
|
|
- font-size: 16px;
|
|
119
|
|
- letter-spacing: 16px;
|
|
120
|
|
- font-family: "仿宋", "宋体";
|
|
121
|
|
- color: #fff;
|
|
122
|
|
- filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#1f90ec, endcolorstr=#1cb5ef, gradientType=1);
|
|
123
|
|
- background: -webkit-gradient(li near, 0 0, 100% 0, from(#1f90ec), to(#1cb5ef));
|
|
124
|
|
- background: -webkit-linear-gradient(left, #1f90ec, #1cb5ef);
|
|
125
|
|
- background: -moz-linear-gradient(left, #1f90ec, #1cb5ef);
|
|
126
|
|
- background: -o-linear-gradient(left, #1f90ec, #1cb5ef);
|
|
127
|
|
- background: linear-gradient(left, #1f90ec, #1cb5ef);
|
|
128
|
|
- cursor: pointer;
|
|
129
|
|
- }
|
|
130
|
|
-
|
|
131
|
|
- .error {
|
|
132
|
|
- height: 13px;
|
|
133
|
|
- background: url(img/yz.png) no-repeat 0 -8px;
|
|
134
|
|
- display: none;
|
|
135
|
|
- }
|
|
136
|
|
- .errorShow {
|
|
137
|
|
- display: inline-block;
|
|
138
|
|
- }
|
|
139
|
|
- .rightCon{
|
|
140
|
|
- width: 100%;
|
|
141
|
|
- position: absolute;
|
|
142
|
|
- top: 0;
|
|
143
|
|
- bottom: 0;
|
|
144
|
|
- right: 0;
|
|
145
|
|
- left: 0;
|
|
146
|
|
- margin: auto;
|
|
147
|
|
- height: 580px;
|
|
148
|
|
- }
|
|
149
|
|
- .leftCon{
|
|
150
|
|
- width: 30%;
|
|
151
|
|
- position: absolute;
|
|
152
|
|
- top: 41%;
|
|
153
|
|
- bottom: 0;
|
|
154
|
|
- right: 0;
|
|
155
|
|
- left: 50%;
|
|
156
|
|
- margin: auto;
|
|
157
|
|
- }
|
|
158
|
|
- .leftCon img{
|
|
159
|
|
- width: 100%;
|
|
160
|
|
- }
|
|
161
|
|
- .leftCon p{
|
|
162
|
|
- font-size: 28px;
|
|
163
|
|
- letter-spacing:10px;
|
|
164
|
|
- color:#e60111;
|
|
165
|
|
- line-height: 80px;
|
|
166
|
|
- }
|
|
167
|
|
- .service{
|
|
168
|
|
- width: 100%;
|
|
169
|
|
- position: absolute;
|
|
170
|
|
- bottom: 30px;
|
|
171
|
|
-
|
|
|
31
|
+ }
|
|
|
32
|
+ .lg_boxs {
|
|
|
33
|
+ display: table-cell;
|
|
|
34
|
+ vertical-align: middle
|
|
172
|
35
|
}
|
|
173
|
36
|
</style>
|
|
|
37
|
+ <!--[if lte IE 7]>
|
|
|
38
|
+<style type="text/css">?
|
|
|
39
|
+.d_left{
|
|
|
40
|
+ background-color: #fff;
|
|
|
41
|
+ position:relative;
|
|
|
42
|
+ overflow:hidden;
|
|
|
43
|
+}
|
|
|
44
|
+.lg_boxs{
|
|
|
45
|
+ position:absolute;
|
|
|
46
|
+ left:50%;top:50%;
|
|
|
47
|
+}
|
|
|
48
|
+.d_left img{
|
|
|
49
|
+ position:relative;
|
|
|
50
|
+ left:-98%;top:-50%;
|
|
|
51
|
+}
|
|
|
52
|
+</style>
|
|
|
53
|
+<![endif]-->
|
|
174
|
54
|
</head>
|
|
|
55
|
+
|
|
175
|
56
|
<body class="signin">
|
|
176
|
|
- <div class="wrap clearfix">
|
|
177
|
|
- <div class="wrap_left" style="position: relative;">
|
|
178
|
|
- <div class="wrap_bj"></div>
|
|
179
|
|
- <div class="leftCon">
|
|
180
|
|
- <img src="img/logintext.png"/>
|
|
181
|
|
- </div>
|
|
|
57
|
+ <div class="signinpanel">
|
|
|
58
|
+
|
|
|
59
|
+ <div class="d_left" style="width: 55%;">
|
|
|
60
|
+ <!--<div class="lg_boxs"> <img src="img/sqLogo.png" alt="" /></div>-->
|
|
182
|
61
|
</div>
|
|
183
|
|
- <div class="wrap_right">
|
|
184
|
|
- <div class="rightCon">
|
|
185
|
|
- <div class="logo" style="width: 100%;text-align: center;">
|
|
186
|
|
- <!--<i class="logo"></i><div class="logoWord"></div>-->
|
|
187
|
|
- <img src="img/sqLogo.png" alt="" />
|
|
|
62
|
+ <div class="d_right" style="width: 45%;">
|
|
|
63
|
+ <form class="dl_form" method="get">
|
|
|
64
|
+ <div class="hj_box"> <img class=" hj" src="./img/hj.png" alt="" /></div>
|
|
|
65
|
+ <div class="user iut">
|
|
|
66
|
+ <i class="i1 us"></i>
|
|
|
67
|
+ <input type="text" placeholder="请输入管理账号" id="user">
|
|
|
68
|
+ <i class="ts user_ts"></i>
|
|
188
|
69
|
</div>
|
|
189
|
|
- <!--<div class="row clearfix">-->
|
|
190
|
|
- <div class="tab_box">
|
|
191
|
|
- <!--col-sm-7-->
|
|
192
|
|
- <ul class="clearfix tab_ul">
|
|
193
|
|
- <li class="active">坐席登录</li>
|
|
194
|
|
- <li>用户登录</li>
|
|
195
|
|
- </ul>
|
|
196
|
|
- <div class="tab_content">
|
|
197
|
|
- <div class="tab_one">
|
|
198
|
|
- <p>
|
|
199
|
|
- <i class="login_icon login_icon_user "></i>
|
|
200
|
|
- <input class="zx_user" type="text" placeholder="请输入您的管理账号" />
|
|
201
|
|
- <i class="login_icon error error_zx error_zx_user"></i>
|
|
202
|
|
- </p>
|
|
203
|
|
- <p>
|
|
204
|
|
- <i class="login_icon login_icon_hua "></i>
|
|
205
|
|
- <input class="zx_fj" type="text" placeholder="请输入分机号" />
|
|
206
|
|
- <i class="login_icon error error_zx error_zx_fj"></i>
|
|
207
|
|
- </p>
|
|
208
|
|
- <p>
|
|
209
|
|
- <i class="login_icon login_icon_lock "></i>
|
|
210
|
|
- <input class="zx_psw" type="password" placeholder="请输入您的密码" />
|
|
211
|
|
- <i class="login_icon error error_zx error_zx_psw"></i>
|
|
212
|
|
- </p>
|
|
213
|
|
- <p class="login_go login_zx">登录</p>
|
|
214
|
|
- </div>
|
|
215
|
|
- <div class="tab_two" style="display: none;">
|
|
216
|
|
- <p>
|
|
217
|
|
- <i class="login_icon login_icon_user "></i>
|
|
218
|
|
- <input class="gl_user" type="text" placeholder="请输入您的管理账号" />
|
|
219
|
|
- <i class="login_icon error error_gl error_gl_user"></i>
|
|
220
|
|
- </p>
|
|
221
|
|
- <p>
|
|
222
|
|
- <i class="login_icon login_icon_lock"></i>
|
|
223
|
|
- <input class="gl_psw" type="password" placeholder="请输入您的密码" />
|
|
224
|
|
- <i class="login_icon error error_gl error_gl_psw"></i>
|
|
225
|
|
- </p>
|
|
226
|
|
- <p class="login_go login_gl">登录</p>
|
|
227
|
|
- </div>
|
|
228
|
|
- </div>
|
|
|
70
|
+ <div class="fj iut">
|
|
|
71
|
+ <i class="i1 yz"></i>
|
|
|
72
|
+ <input type="text" placeholder="请输入分机号" id="fj">
|
|
|
73
|
+ <i class="ts fj_ts"></i>
|
|
229
|
74
|
</div>
|
|
230
|
|
- <!--</div>-->
|
|
231
|
|
- <div class="service" >
|
|
232
|
|
- <!--row clearfix-->
|
|
233
|
|
- <!--<div class="col-sm-7">-->
|
|
234
|
|
- <p style="color: #313c58; font-size: 12px;text-align: center;"></p>
|
|
235
|
|
- <!--</div>-->
|
|
|
75
|
+ <div class="password iut">
|
|
|
76
|
+ <i class="i1 ps"></i>
|
|
|
77
|
+ <input type="password" placeholder="请输入密码" id="password">
|
|
|
78
|
+ <i class="ts password_ts"></i>
|
|
236
|
79
|
</div>
|
|
237
|
|
-
|
|
238
|
|
- </div>
|
|
239
|
|
-
|
|
|
80
|
+ <div class="b_box">
|
|
|
81
|
+ <div class="btns" type="button">登录</div>
|
|
|
82
|
+ </div>
|
|
|
83
|
+ </form>
|
|
240
|
84
|
</div>
|
|
241
|
85
|
|
|
242
|
86
|
</div>
|
|
243
|
87
|
<script>
|
|
244
|
88
|
$(function() {
|
|
245
|
|
- var a=0;
|
|
246
|
|
- $('.tab_ul li').click(function() {
|
|
247
|
|
- $(this).addClass("active").siblings().removeClass("active");
|
|
248
|
|
- var index = $(this).index();
|
|
249
|
|
- a=index;
|
|
250
|
|
- $('.tab_content').children('div').eq(index).show().siblings().hide();
|
|
251
|
|
-
|
|
|
89
|
+ /*输入框样式改变*/
|
|
|
90
|
+ $("#user").focus(function() {
|
|
|
91
|
+ $(this).parent().addClass("_success");
|
|
|
92
|
+ });
|
|
|
93
|
+ $("#user").blur(function() {
|
|
|
94
|
+ $(this).parent().removeClass("_success");
|
|
252
|
95
|
})
|
|
253
|
|
- /*cook存储数据*/
|
|
|
96
|
+ $("#fj").focus(function() {
|
|
|
97
|
+ $(this).parent().addClass("_success");
|
|
|
98
|
+ });
|
|
|
99
|
+ $("#fj").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存储数据*/
|
|
254
|
109
|
if($.cookie("username")) {
|
|
255
|
110
|
//取值如果存在则赋值
|
|
256
|
|
- $(".gl_user").val($.cookie("user")); //用户名
|
|
257
|
|
- $("zx_fj").val($.cookie("fj"));
|
|
258
|
|
- $(".zx_user").val($.cookie("user"));
|
|
|
111
|
+ $("#user").val($.cookie("user")); //用户名
|
|
|
112
|
+ $("#fj").val($.cookie("fj"));
|
|
|
113
|
+
|
|
259
|
114
|
}
|
|
260
|
|
- //键盘登录事件
|
|
261
|
115
|
$('input').bind('keypress', function(event) {
|
|
262
|
116
|
if(event.keyCode == "13") {
|
|
263
|
|
- if(a == 0) {
|
|
264
|
|
- $('.login_zx').trigger("click");
|
|
265
|
|
- } else {
|
|
266
|
|
- $(".login_gl").trigger("click");
|
|
267
|
|
- }
|
|
|
117
|
+ $(".btns").trigger("click");
|
|
268
|
118
|
}
|
|
269
|
119
|
});
|
|
270
|
|
- //坐席登录
|
|
271
|
|
- $('.login_zx').click(function(){
|
|
272
|
|
- var zx_user = $(".zx_user").val();
|
|
273
|
|
- var zx_fj = $(".zx_fj").val();
|
|
274
|
|
- var zx_psw = $(".zx_psw").val();
|
|
275
|
|
- if(zx_user == "" || zx_fj == "" || zx_psw == "") {
|
|
276
|
|
- $(".error_zx").addClass('errorShow');
|
|
277
|
|
- if($(".zx_user").val() == "") {
|
|
278
|
|
- $(".zx_user").focus(function() {
|
|
279
|
|
- $(".error_zx").removeClass('errorShow');
|
|
280
|
|
- });
|
|
281
|
|
- } else {
|
|
282
|
|
- $(".error_zx_user").removeClass('errorShow');
|
|
283
|
|
- }
|
|
284
|
|
- }else {
|
|
285
|
|
- var currenttime=CurentTime();
|
|
286
|
|
- var datatime=currenttime.split(' ')[1].split(':').join('')
|
|
287
|
|
- var key = CryptoJS.enc.Utf8.parse(")O[9d]6,YF}+efcaj{+8>Z'e9M"+datatime);
|
|
288
|
|
- var zx_psw = CryptoJS.enc.Utf8.parse($.md5(zx_psw));
|
|
289
|
|
- var encrypted = CryptoJS.AES.encrypt(zx_psw, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
|
|
290
|
|
- /*请求后台*/
|
|
291
|
|
- $.cookie("extno",zx_fj);
|
|
292
|
|
- $.cookie("zx_user",zx_user);
|
|
293
|
|
-
|
|
294
|
|
- $.ajax({
|
|
295
|
|
- type: "post",
|
|
296
|
|
- url: huayi.config.callcenter_url + "/Login/login",
|
|
297
|
|
- dataType: 'json',
|
|
298
|
|
- async: true,
|
|
299
|
|
- data: {
|
|
300
|
|
- username: zx_user,
|
|
301
|
|
- extensionphone: zx_fj,
|
|
302
|
|
- LoginTime:currenttime,
|
|
303
|
|
- password:encrypted.toString()
|
|
304
|
|
- },
|
|
305
|
|
- success: function(data) {
|
|
306
|
|
- /*验证请求*/
|
|
307
|
|
- if(data.state == "success") {
|
|
308
|
|
- $.cookie("token", data.data.token, {
|
|
309
|
|
- expires: 7
|
|
310
|
|
- });
|
|
311
|
|
- $.cookie("extno", zx_fj, {
|
|
312
|
|
- expires: 7
|
|
313
|
|
- });
|
|
314
|
|
- $.cookie("zx_user", zx_user, {
|
|
315
|
|
- expires: 7
|
|
316
|
|
- });
|
|
317
|
|
- window.location.href = "home.html";
|
|
318
|
|
-
|
|
319
|
|
- }
|
|
320
|
|
- //else {
|
|
321
|
|
- // $(".zx_user").val('');
|
|
322
|
|
- // $(".zx_fj").val('');
|
|
323
|
|
- // $(".zx_psw").val('');
|
|
324
|
|
- //}
|
|
325
|
|
- }
|
|
326
|
|
- });
|
|
327
|
|
- }
|
|
328
|
|
-
|
|
329
|
|
- })
|
|
330
|
120
|
function CurentTime(){
|
|
331
|
121
|
var now = new Date();
|
|
332
|
122
|
|
|
|
@@ -359,29 +149,34 @@
|
|
359
|
149
|
if (ss < 10) clock += '0';
|
|
360
|
150
|
clock += ss;
|
|
361
|
151
|
return(clock);
|
|
362
|
|
- }
|
|
363
|
|
- //用户登录
|
|
364
|
|
- $('.login_gl').click(function() {
|
|
365
|
|
- var gl_user = $(".gl_user").val();
|
|
366
|
|
- var gl_psw = $(".gl_psw").val();
|
|
367
|
|
- if(gl_user == "" || gl_psw == "") {
|
|
368
|
|
- $(".error_gl").addClass('errorShow');
|
|
369
|
|
- if($(".gl_user").val() == "") {
|
|
370
|
|
- $(".gl_user").focus(function() {
|
|
371
|
|
- $(".error_gl").removeClass('errorShow');
|
|
|
152
|
+ }
|
|
|
153
|
+ $(".btns").click(function() {
|
|
|
154
|
+ var User = $("#user").val();
|
|
|
155
|
+ var Fj = $("#fj").val();
|
|
|
156
|
+ var Password = $("#password").val();
|
|
|
157
|
+ /*保存COOK*/
|
|
|
158
|
+
|
|
|
159
|
+ //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
|
|
|
160
|
+ //$.cookie("fj", $("#fj").val(), {expires: 7,secure:true});
|
|
|
161
|
+ /*表单验证*/
|
|
|
162
|
+ if(User == "" || Fj == "" || Password == "") {
|
|
|
163
|
+ $(".ts").addClass("Yz_error");
|
|
|
164
|
+ if($("#user").val() == "") {
|
|
|
165
|
+ $("#user").focus(function() {
|
|
|
166
|
+ $(".user_ts").removeClass("Yz_error");
|
|
|
167
|
+ $(".fj_ts").removeClass("Yz_error");
|
|
|
168
|
+ $(".password_ts").removeClass("Yz_error");
|
|
|
169
|
+ $(this).parent().addClass("_success");
|
|
372
|
170
|
});
|
|
373
|
171
|
} else {
|
|
374
|
|
- $(".error_gl_user").removeClass('errorShow');
|
|
|
172
|
+ $(".user_ts").addClass("Yz_success");
|
|
375
|
173
|
}
|
|
376
|
174
|
} else {
|
|
377
|
175
|
var currenttime=CurentTime();
|
|
378
|
176
|
var datatime=currenttime.split(' ')[1].split(':').join('')
|
|
379
|
177
|
var key = CryptoJS.enc.Utf8.parse(")O[9d]6,YF}+efcaj{+8>Z'e9M"+datatime);
|
|
380
|
|
- var gl_psw = CryptoJS.enc.Utf8.parse($.md5(gl_psw));
|
|
381
|
|
- var encrypted = CryptoJS.AES.encrypt(gl_psw, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
|
|
382
|
|
-// var decrypt = CryptoJS.AES.decrypt(encrypted, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
|
|
383
|
|
-// console.log(CryptoJS.enc.Utf8.stringify(decrypt).toString());
|
|
384
|
|
-// return false;
|
|
|
178
|
+ var zx_psw = CryptoJS.enc.Utf8.parse($.md5(Password));
|
|
|
179
|
+ var encrypted = CryptoJS.AES.encrypt(zx_psw, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
|
|
385
|
180
|
/*请求后台*/
|
|
386
|
181
|
$.ajax({
|
|
387
|
182
|
type: "post",
|
|
|
@@ -389,32 +184,30 @@
|
|
389
|
184
|
dataType: 'json',
|
|
390
|
185
|
async: true,
|
|
391
|
186
|
data: {
|
|
392
|
|
- username: gl_user,
|
|
393
|
|
- password: encrypted.toString(),
|
|
394
|
|
- LoginTime:currenttime
|
|
|
187
|
+ username: User,
|
|
|
188
|
+ extensionphone: Fj,
|
|
|
189
|
+ LoginTime:currenttime,
|
|
|
190
|
+ password:encrypted.toString()
|
|
395
|
191
|
},
|
|
396
|
192
|
success: function(data) {
|
|
397
|
193
|
/*验证请求*/
|
|
398
|
194
|
if(data.state == "success") {
|
|
399
|
195
|
$.cookie("token", data.data.token, {
|
|
400
|
196
|
expires: 7
|
|
401
|
|
- });
|
|
402
|
|
- $.cookie("zx_user", gl_user, {
|
|
403
|
|
- expires: 7
|
|
404
|
|
- });
|
|
|
197
|
+ });
|
|
|
198
|
+ $.cookie("extno", Fj, {
|
|
|
199
|
+ expires: 7
|
|
|
200
|
+ });
|
|
405
|
201
|
window.location.href = "home.html";
|
|
406
|
202
|
}
|
|
407
|
|
- //else{
|
|
408
|
|
- // $(".gl_user").val('');
|
|
409
|
|
- // $(".gl_psw").val('');
|
|
410
|
|
- //}
|
|
411
|
203
|
}
|
|
412
|
204
|
});
|
|
413
|
205
|
}
|
|
|
206
|
+ });
|
|
|
207
|
+ });
|
|
|
208
|
+ /*点击提交*/
|
|
414
|
209
|
|
|
415
|
|
- })
|
|
416
|
|
-
|
|
417
|
|
- })
|
|
|
210
|
+ /*cook*/
|
|
418
|
211
|
</script>
|
|
419
|
212
|
</body>
|
|
420
|
213
|
|