|
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+<!DOCTYPE html>
|
|
|
2
|
+<html lang="en">
|
|
|
3
|
+
|
|
|
4
|
+ <head>
|
|
|
5
|
+ <meta charset="utf-8">
|
|
|
6
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
|
7
|
+ <title>登录</title>
|
|
|
8
|
+ <meta name="keywords">
|
|
|
9
|
+ <meta name="description">
|
|
|
10
|
+ <meta name="renderer" content="webkit">
|
|
|
11
|
+ <!--<link rel="shortcut icon" href="./img/32.ico" />-->
|
|
|
12
|
+ <link rel="stylesheet" href="./css/init.css" />
|
|
|
13
|
+ <script src="./Script/Common/huayi.load.js"></script>
|
|
|
14
|
+ <script src="./Script/Common/huayi.config.js"></script>
|
|
|
15
|
+ <script src="./js/jquery.md5.js"></script>
|
|
|
16
|
+ <script src="./js/purify.min.js"></script>
|
|
|
17
|
+ <script src="./js/aes/crypto-js.js"></script>
|
|
|
18
|
+ <script src="./js/sm2/sm2.js"></script>
|
|
|
19
|
+ <script src="./js/sm2/decrypt.js"></script>
|
|
|
20
|
+ <style>
|
|
|
21
|
+ html {
|
|
|
22
|
+ margin: 0 auto;
|
|
|
23
|
+ padding: 0;
|
|
|
24
|
+ height: 100%;
|
|
|
25
|
+ }
|
|
|
26
|
+
|
|
|
27
|
+ body {
|
|
|
28
|
+ height: 100%;
|
|
|
29
|
+ background: #fff;
|
|
|
30
|
+ }
|
|
|
31
|
+
|
|
|
32
|
+ .wrap {
|
|
|
33
|
+ width: 100%;
|
|
|
34
|
+ height: 100%;
|
|
|
35
|
+ }
|
|
|
36
|
+
|
|
|
37
|
+ .wrap_right {
|
|
|
38
|
+ float: left;
|
|
|
39
|
+ width: 50%;
|
|
|
40
|
+ height: 100%;
|
|
|
41
|
+ }
|
|
|
42
|
+
|
|
|
43
|
+ .wrap_left {
|
|
|
44
|
+ float: left;
|
|
|
45
|
+ width: 50%;
|
|
|
46
|
+ height: 100%;
|
|
|
47
|
+ }
|
|
|
48
|
+
|
|
|
49
|
+ .wrap_right {
|
|
|
50
|
+ position: relative;
|
|
|
51
|
+ }
|
|
|
52
|
+
|
|
|
53
|
+ .wrap_bj {
|
|
|
54
|
+ width: 100%;
|
|
|
55
|
+ height: 100%;
|
|
|
56
|
+ background: url(img/left_amg_01.jpg) no-repeat;
|
|
|
57
|
+ background-size: 100% 100%;
|
|
|
58
|
+ }
|
|
|
59
|
+
|
|
|
60
|
+ .tab_box {
|
|
|
61
|
+ border: 1px solid #41caf2;
|
|
|
62
|
+ border-top-right-radius: 15px;
|
|
|
63
|
+ border-bottom-left-radius: 15px;
|
|
|
64
|
+ margin: 50px auto 65px;
|
|
|
65
|
+ padding: 0;
|
|
|
66
|
+ overflow: hidden;
|
|
|
67
|
+ width: 410px;
|
|
|
68
|
+ }
|
|
|
69
|
+
|
|
|
70
|
+ .tab_box ul {
|
|
|
71
|
+ list-style: none;
|
|
|
72
|
+ margin: 0;
|
|
|
73
|
+ padding: 0;
|
|
|
74
|
+ width: 100%;
|
|
|
75
|
+ height: 50px;
|
|
|
76
|
+ line-height: 50px;
|
|
|
77
|
+ font-size: 16px;
|
|
|
78
|
+ color: #41caf2;
|
|
|
79
|
+ border-bottom: 1px solid #41caf2;
|
|
|
80
|
+ text-align: center;
|
|
|
81
|
+ }
|
|
|
82
|
+
|
|
|
83
|
+ .tab_box ul li {
|
|
|
84
|
+ width: 50%;
|
|
|
85
|
+ float: left;
|
|
|
86
|
+ }
|
|
|
87
|
+
|
|
|
88
|
+ .active {
|
|
|
89
|
+ background: #41caf2;
|
|
|
90
|
+ color: #fff;
|
|
|
91
|
+ }
|
|
|
92
|
+
|
|
|
93
|
+ .tab_content {
|
|
|
94
|
+ margin: 57px 0 35px 0;
|
|
|
95
|
+ }
|
|
|
96
|
+
|
|
|
97
|
+ .tab_content div p {
|
|
|
98
|
+ width: 80%;
|
|
|
99
|
+ margin: 0 auto;
|
|
|
100
|
+ height: 35px;
|
|
|
101
|
+ border: 1px solid #41caf2;
|
|
|
102
|
+ border-radius: 15px;
|
|
|
103
|
+ margin-bottom: 25px;
|
|
|
104
|
+ line-height: 30px;
|
|
|
105
|
+ padding-left: 20px;
|
|
|
106
|
+ }
|
|
|
107
|
+
|
|
|
108
|
+ .tab_content div p input {
|
|
|
109
|
+ width: 75%;
|
|
|
110
|
+ border: 0;
|
|
|
111
|
+ font-size: 16px;
|
|
|
112
|
+ outline: none;
|
|
|
113
|
+ font-family: "仿宋", "宋体";
|
|
|
114
|
+ }
|
|
|
115
|
+
|
|
|
116
|
+ .login_icon {
|
|
|
117
|
+ display: inline-block;
|
|
|
118
|
+ width: 17px;
|
|
|
119
|
+ height: 19px;
|
|
|
120
|
+ vertical-align: middle;
|
|
|
121
|
+ margin-right: 15px;
|
|
|
122
|
+ }
|
|
|
123
|
+
|
|
|
124
|
+ .login_icon_user {
|
|
|
125
|
+ background: url(img/login_user.png) no-repeat;
|
|
|
126
|
+ }
|
|
|
127
|
+
|
|
|
128
|
+ .login_icon_lock {
|
|
|
129
|
+ background: url(img/login_lock.png) no-repeat;
|
|
|
130
|
+ }
|
|
|
131
|
+
|
|
|
132
|
+ .login_icon_hua {
|
|
|
133
|
+ background: url(img/login_hua.png) no-repeat;
|
|
|
134
|
+ }
|
|
|
135
|
+
|
|
|
136
|
+ .login_go {
|
|
|
137
|
+ text-align: center;
|
|
|
138
|
+ padding: 0 !important;
|
|
|
139
|
+ font-size: 16px;
|
|
|
140
|
+ letter-spacing: 16px;
|
|
|
141
|
+ font-family: "仿宋", "宋体";
|
|
|
142
|
+ color: #fff;
|
|
|
143
|
+ filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#1f90ec, endcolorstr=#1cb5ef, gradientType=1);
|
|
|
144
|
+ background: -webkit-gradient(li near, 0 0, 100% 0, from(#1f90ec), to(#1cb5ef));
|
|
|
145
|
+ background: -webkit-linear-gradient(left, #1f90ec, #1cb5ef);
|
|
|
146
|
+ background: -moz-linear-gradient(left, #1f90ec, #1cb5ef);
|
|
|
147
|
+ background: -o-linear-gradient(left, #1f90ec, #1cb5ef);
|
|
|
148
|
+ background: linear-gradient(left, #1f90ec, #1cb5ef);
|
|
|
149
|
+ cursor: pointer;
|
|
|
150
|
+ }
|
|
|
151
|
+
|
|
|
152
|
+ .error {
|
|
|
153
|
+ height: 13px;
|
|
|
154
|
+ background: url(img/yz.png) no-repeat 0 -8px;
|
|
|
155
|
+ display: none;
|
|
|
156
|
+ }
|
|
|
157
|
+
|
|
|
158
|
+ .errorShow {
|
|
|
159
|
+ display: inline-block;
|
|
|
160
|
+ }
|
|
|
161
|
+
|
|
|
162
|
+ .rightCon {
|
|
|
163
|
+ width: 100%;
|
|
|
164
|
+ position: absolute;
|
|
|
165
|
+ top: 0;
|
|
|
166
|
+ bottom: 0;
|
|
|
167
|
+ right: 0;
|
|
|
168
|
+ left: 0;
|
|
|
169
|
+ margin: auto;
|
|
|
170
|
+ height: 580px;
|
|
|
171
|
+ }
|
|
|
172
|
+
|
|
|
173
|
+ .leftCon {
|
|
|
174
|
+ width: 30%;
|
|
|
175
|
+ position: absolute;
|
|
|
176
|
+ top: 41%;
|
|
|
177
|
+ bottom: 0;
|
|
|
178
|
+ right: 0;
|
|
|
179
|
+ left: 50%;
|
|
|
180
|
+ margin: auto;
|
|
|
181
|
+ }
|
|
|
182
|
+
|
|
|
183
|
+ .leftCon img {
|
|
|
184
|
+ width: 100%;
|
|
|
185
|
+ }
|
|
|
186
|
+
|
|
|
187
|
+ .leftCon p {
|
|
|
188
|
+ font-size: 28px;
|
|
|
189
|
+ letter-spacing: 10px;
|
|
|
190
|
+ color: #e60111;
|
|
|
191
|
+ line-height: 80px;
|
|
|
192
|
+ }
|
|
|
193
|
+
|
|
|
194
|
+ .service {
|
|
|
195
|
+ width: 100%;
|
|
|
196
|
+ position: absolute;
|
|
|
197
|
+ bottom: 30px;
|
|
|
198
|
+ }
|
|
|
199
|
+
|
|
|
200
|
+ .tab_content div p {
|
|
|
201
|
+ width: 80%;
|
|
|
202
|
+ margin: 0 auto;
|
|
|
203
|
+ height: 35px;
|
|
|
204
|
+ border: 1px solid #41caf2;
|
|
|
205
|
+ border-radius: 15px;
|
|
|
206
|
+ margin-bottom: 20px;
|
|
|
207
|
+ line-height: 30px;
|
|
|
208
|
+ padding-left: 20px;
|
|
|
209
|
+ }
|
|
|
210
|
+
|
|
|
211
|
+ .tab_content div p .verification,
|
|
|
212
|
+ .tab_content div p .verification_user {
|
|
|
213
|
+ width: 50%;
|
|
|
214
|
+ }
|
|
|
215
|
+
|
|
|
216
|
+ .tab_content div p .btnVerifi,
|
|
|
217
|
+ .tab_content div p .btnVerifi_user {
|
|
|
218
|
+ width: 36.7%;
|
|
|
219
|
+ border: 0;
|
|
|
220
|
+ height: 33px;
|
|
|
221
|
+ border-radius: 0px 15px 15px 0px;
|
|
|
222
|
+ font-size: 16px;
|
|
|
223
|
+ outline: none;
|
|
|
224
|
+ font-family: "仿宋", "宋体";
|
|
|
225
|
+ background: #41caf2;
|
|
|
226
|
+ color: #FFFFFF;
|
|
|
227
|
+ }
|
|
|
228
|
+
|
|
|
229
|
+ input::-webkit-outer-spin-button,
|
|
|
230
|
+ input::-webkit-inner-spin-button {
|
|
|
231
|
+ -webkit-appearance: none;
|
|
|
232
|
+ }
|
|
|
233
|
+
|
|
|
234
|
+ input[type="number"] {
|
|
|
235
|
+ -moz-appearance: textfield;
|
|
|
236
|
+ }
|
|
|
237
|
+
|
|
|
238
|
+ .SMSreminder {
|
|
|
239
|
+ color: #C4C4C5;
|
|
|
240
|
+ /*font-family: "仿宋", "宋体";*/
|
|
|
241
|
+ font-size: 12px;
|
|
|
242
|
+ padding: 0 37px;
|
|
|
243
|
+ }
|
|
|
244
|
+ </style>
|
|
|
245
|
+ </head>
|
|
|
246
|
+
|
|
|
247
|
+ <body class="signin">
|
|
|
248
|
+ <div class="wrap clearfix">
|
|
|
249
|
+ <div class="wrap_left" style="position: relative;">
|
|
|
250
|
+ <div class="wrap_bj"></div>
|
|
|
251
|
+ <div class="leftCon">
|
|
|
252
|
+ <img src="img/logintext.png" />
|
|
|
253
|
+ </div>
|
|
|
254
|
+ </div>
|
|
|
255
|
+ <div class="wrap_right">
|
|
|
256
|
+ <div class="rightCon">
|
|
|
257
|
+ <div class="logo" style="width: 100%;text-align: center;"></div>
|
|
|
258
|
+ <div class="tab_box">
|
|
|
259
|
+ <ul class="clearfix tab_ul">
|
|
|
260
|
+ <li class="active">坐席登录</li>
|
|
|
261
|
+ <li>用户登录</li>
|
|
|
262
|
+ </ul>
|
|
|
263
|
+ <div class="tab_content">
|
|
|
264
|
+ <div class="tab_one">
|
|
|
265
|
+ <p>
|
|
|
266
|
+ <i class="login_icon login_icon_user "></i>
|
|
|
267
|
+ <input class="zx_user" type="text" placeholder="请输入您的管理账号" />
|
|
|
268
|
+ <i class="login_icon error error_zx error_zx_user"></i>
|
|
|
269
|
+ </p>
|
|
|
270
|
+ <p>
|
|
|
271
|
+ <i class="login_icon login_icon_hua "></i>
|
|
|
272
|
+ <input class="zx_fj" type="text" placeholder="请输入分机号" />
|
|
|
273
|
+ <i class="login_icon error error_zx error_zx_fj"></i>
|
|
|
274
|
+ </p>
|
|
|
275
|
+ <p>
|
|
|
276
|
+ <i class="login_icon login_icon_lock "></i>
|
|
|
277
|
+ <input class="zx_psw" type="password" placeholder="请输入您的密码" />
|
|
|
278
|
+ <i class="login_icon error error_zx error_zx_psw"></i>
|
|
|
279
|
+ </p>
|
|
|
280
|
+ <p>
|
|
|
281
|
+ <i class="login_icon login_icon_hua "></i>
|
|
|
282
|
+ <input class="verification" type="number" placeholder="请输入验证码" />
|
|
|
283
|
+ <button class="btnVerifi" type="button">获取验证码</button>
|
|
|
284
|
+ </p>
|
|
|
285
|
+ <p class="login_go login_zx">登录</p>
|
|
|
286
|
+ <div class="SMSreminder">出于12345平台数据安全的考虑,现需要在账号登录环节增加手机短信验证。如果账号未关联手机号,请致电联系5116015。密码或者短信验证码连续输入错5次就锁定账号,需要管理员角色来解锁。</div>
|
|
|
287
|
+
|
|
|
288
|
+ </div>
|
|
|
289
|
+ <div class="tab_two" style="display: none;">
|
|
|
290
|
+ <p>
|
|
|
291
|
+ <i class="login_icon login_icon_user "></i>
|
|
|
292
|
+ <input class="gl_user" type="text" placeholder="请输入您的管理账号" />
|
|
|
293
|
+ <i class="login_icon error error_gl error_gl_user"></i>
|
|
|
294
|
+ </p>
|
|
|
295
|
+ <p>
|
|
|
296
|
+ <i class="login_icon login_icon_lock"></i>
|
|
|
297
|
+ <input class="gl_psw" type="password" placeholder="请输入您的密码" />
|
|
|
298
|
+ <i class="login_icon error error_gl error_gl_psw"></i>
|
|
|
299
|
+ </p>
|
|
|
300
|
+ <p>
|
|
|
301
|
+ <i class="login_icon login_icon_hua "></i>
|
|
|
302
|
+ <input class="verification_user" type="text" placeholder="请输入验证码" />
|
|
|
303
|
+ <button class="btnVerifi_user" type="button">获取验证码</button>
|
|
|
304
|
+ </p>
|
|
|
305
|
+ <p class="login_go login_gl">登录</p>
|
|
|
306
|
+ <div class="SMSreminder">出于12345平台数据安全的考虑,现需要在账号登录环节增加手机短信验证。如果账号未关联手机号,请致电联系5116015。密码或者短信验证码连续输入错5次就锁定账号,需要管理员角色来解锁。</div>
|
|
|
307
|
+ </div>
|
|
|
308
|
+ </div>
|
|
|
309
|
+ </div>
|
|
|
310
|
+ <div class="service">
|
|
|
311
|
+ <p style="color: #313c58; font-size: 12px;text-align: center;"></p>
|
|
|
312
|
+ </div>
|
|
|
313
|
+ </div>
|
|
|
314
|
+ </div>
|
|
|
315
|
+ </div>
|
|
|
316
|
+ <script>
|
|
|
317
|
+ $(function() {
|
|
|
318
|
+ var a = 0;
|
|
|
319
|
+ $('.tab_ul li').click(function() {
|
|
|
320
|
+ $(this).addClass("active").siblings().removeClass("active");
|
|
|
321
|
+ var index = $(this).index();
|
|
|
322
|
+ a = index;
|
|
|
323
|
+ $('.tab_content').children('div').eq(index).show().siblings().hide();
|
|
|
324
|
+ })
|
|
|
325
|
+ /*cook存储数据*/
|
|
|
326
|
+ if($.cookie("username")) {
|
|
|
327
|
+ //取值如果存在则赋值
|
|
|
328
|
+ $(".gl_user").val($.cookie("user")); //用户名
|
|
|
329
|
+ $("zx_fj").val($.cookie("fj"));
|
|
|
330
|
+ $(".zx_user").val($.cookie("user"));
|
|
|
331
|
+ }
|
|
|
332
|
+
|
|
|
333
|
+ //键盘登录事件
|
|
|
334
|
+ $('input').bind('keypress', function(event) {
|
|
|
335
|
+ if(event.keyCode == "13") {
|
|
|
336
|
+ if(a == 0) {
|
|
|
337
|
+ $('.login_zx').trigger("click");
|
|
|
338
|
+ } else {
|
|
|
339
|
+ $(".login_gl").trigger("click");
|
|
|
340
|
+ }
|
|
|
341
|
+ }
|
|
|
342
|
+ });
|
|
|
343
|
+
|
|
|
344
|
+ $(".btnVerifi").click(function() {
|
|
|
345
|
+ if(!$(".zx_user").val()) {
|
|
|
346
|
+ layer.msg('请输入账号')
|
|
|
347
|
+ return false;
|
|
|
348
|
+ }
|
|
|
349
|
+ var mobile = $(".zx_user").val();
|
|
|
350
|
+ var zx_psw = DOMPurify.sanitize($(".zx_psw").val());
|
|
|
351
|
+ var currenttime = CurentTime();
|
|
|
352
|
+ var datatime = currenttime.split(' ')[1].split(':').join('')
|
|
|
353
|
+ var pass = encryptFn($.md5(zx_psw))
|
|
|
354
|
+ sendMsg(mobile, pass);
|
|
|
355
|
+
|
|
|
356
|
+ })
|
|
|
357
|
+
|
|
|
358
|
+ $(".btnVerifi_user").click(function() {
|
|
|
359
|
+ if(!$(".gl_user").val()) {
|
|
|
360
|
+ layer.msg('请输入账号')
|
|
|
361
|
+ return false;
|
|
|
362
|
+ }
|
|
|
363
|
+ var mobile = $(".gl_user").val();
|
|
|
364
|
+ var user_psw = DOMPurify.sanitize($(".gl_psw").val());
|
|
|
365
|
+ var currenttime = CurentTime();
|
|
|
366
|
+ var datatime = currenttime.split(' ')[1].split(':').join('')
|
|
|
367
|
+ var pass = encryptFn($.md5(user_psw))
|
|
|
368
|
+ sendMsg(mobile, pass);
|
|
|
369
|
+
|
|
|
370
|
+ })
|
|
|
371
|
+
|
|
|
372
|
+ //坐席登录
|
|
|
373
|
+ $('.login_zx').click(function() {
|
|
|
374
|
+ localStorage.setItem('loginPassword', $('.zx_psw').val())
|
|
|
375
|
+ var zx_user = DOMPurify.sanitize($(".zx_user").val());
|
|
|
376
|
+ var zx_fj = DOMPurify.sanitize($(".zx_fj").val());
|
|
|
377
|
+ var zx_psw = DOMPurify.sanitize($(".zx_psw").val());
|
|
|
378
|
+ if(zx_user == "" || zx_fj == "" || zx_psw == "") {
|
|
|
379
|
+ $(".error_zx").addClass('errorShow');
|
|
|
380
|
+ if(zx_user == "") {
|
|
|
381
|
+ $(".zx_user").focus(function() {
|
|
|
382
|
+ $(".error_zx").removeClass('errorShow');
|
|
|
383
|
+ });
|
|
|
384
|
+ } else {
|
|
|
385
|
+ $(".error_zx_user").removeClass('errorShow');
|
|
|
386
|
+ }
|
|
|
387
|
+ } else {
|
|
|
388
|
+ var currenttime = CurentTime();
|
|
|
389
|
+ var datatime = currenttime.split(' ')[1].split(':').join('')
|
|
|
390
|
+ var encrypted = encryptFn($.md5(zx_psw))
|
|
|
391
|
+ /*请求后台*/
|
|
|
392
|
+ $.cookie("extno", zx_fj);
|
|
|
393
|
+ $.cookie("zx_user", zx_user);
|
|
|
394
|
+
|
|
|
395
|
+ $.ajax({
|
|
|
396
|
+ type: "post",
|
|
|
397
|
+ url: huayi.config.callcenter_url + "/Login/login",
|
|
|
398
|
+ dataType: 'json',
|
|
|
399
|
+ async: true,
|
|
|
400
|
+ data: {
|
|
|
401
|
+ username: zx_user,
|
|
|
402
|
+ extensionphone: zx_fj,
|
|
|
403
|
+ LoginTime: currenttime,
|
|
|
404
|
+ password: encrypted.toString(),
|
|
|
405
|
+ Code: $(".verification").val()
|
|
|
406
|
+ },
|
|
|
407
|
+ success: function(data) {
|
|
|
408
|
+ /*验证请求*/
|
|
|
409
|
+ if(data.state == "success") {
|
|
|
410
|
+ $.cookie("token", data.data.token, {
|
|
|
411
|
+ expires: 7
|
|
|
412
|
+ });
|
|
|
413
|
+ $.cookie("extno", zx_fj, {
|
|
|
414
|
+ expires: 7
|
|
|
415
|
+ });
|
|
|
416
|
+ $.cookie("zx_user", zx_user, {
|
|
|
417
|
+ expires: 7
|
|
|
418
|
+ });
|
|
|
419
|
+ loginHref()
|
|
|
420
|
+
|
|
|
421
|
+ }
|
|
|
422
|
+
|
|
|
423
|
+ }
|
|
|
424
|
+ });
|
|
|
425
|
+ }
|
|
|
426
|
+
|
|
|
427
|
+ })
|
|
|
428
|
+
|
|
|
429
|
+ //用户登录
|
|
|
430
|
+ $('.login_gl').click(function() {
|
|
|
431
|
+ localStorage.setItem('loginPassword', $('.gl_psw').val())
|
|
|
432
|
+ var gl_user = DOMPurify.sanitize($(".gl_user").val());
|
|
|
433
|
+ var gl_psw = DOMPurify.sanitize($(".gl_psw").val());
|
|
|
434
|
+ if(gl_user == "" || gl_psw == "") {
|
|
|
435
|
+ $(".error_gl").addClass('errorShow');
|
|
|
436
|
+ if(gl_user == "") {
|
|
|
437
|
+ $(".gl_user").focus(function() {
|
|
|
438
|
+ $(".error_gl").removeClass('errorShow');
|
|
|
439
|
+ });
|
|
|
440
|
+ } else {
|
|
|
441
|
+ $(".error_gl_user").removeClass('errorShow');
|
|
|
442
|
+ }
|
|
|
443
|
+ } else {
|
|
|
444
|
+ var currenttime = CurentTime();
|
|
|
445
|
+ var datatime = currenttime.split(' ')[1].split(':').join('')
|
|
|
446
|
+ var encrypted = encryptFn($.md5(gl_psw))
|
|
|
447
|
+ /*请求后台*/
|
|
|
448
|
+ $.ajax({
|
|
|
449
|
+ type: "post",
|
|
|
450
|
+ url: huayi.config.callcenter_url + "/Login/login",
|
|
|
451
|
+ dataType: 'json',
|
|
|
452
|
+ async: true,
|
|
|
453
|
+ data: {
|
|
|
454
|
+ username: gl_user,
|
|
|
455
|
+ password: encrypted.toString(),
|
|
|
456
|
+ LoginTime: currenttime,
|
|
|
457
|
+ Code: $(".verification_user").val()
|
|
|
458
|
+ },
|
|
|
459
|
+ success: function(data) {
|
|
|
460
|
+ /*验证请求*/
|
|
|
461
|
+ if(data.state == "success") {
|
|
|
462
|
+ $.cookie("token", data.data.token, {
|
|
|
463
|
+ expires: 7
|
|
|
464
|
+ });
|
|
|
465
|
+ $.cookie("zx_user", gl_user, {
|
|
|
466
|
+ expires: 7
|
|
|
467
|
+ });
|
|
|
468
|
+ loginHref()
|
|
|
469
|
+
|
|
|
470
|
+ }
|
|
|
471
|
+ //else{
|
|
|
472
|
+ // $(".gl_user").val('');
|
|
|
473
|
+ // $(".gl_psw").val('');
|
|
|
474
|
+ //}
|
|
|
475
|
+ }
|
|
|
476
|
+ });
|
|
|
477
|
+ }
|
|
|
478
|
+
|
|
|
479
|
+ })
|
|
|
480
|
+
|
|
|
481
|
+ function sendMsg(mobile, pass) {
|
|
|
482
|
+ var currenttime = CurentTime();
|
|
|
483
|
+ $.ajax({
|
|
|
484
|
+ type: "post",
|
|
|
485
|
+ url: huayi.config.callcenter_url + "Login/SendCode",
|
|
|
486
|
+ async: true,
|
|
|
487
|
+ dataType: 'json',
|
|
|
488
|
+ data: {
|
|
|
489
|
+ usercode: mobile,
|
|
|
490
|
+ Password: pass,
|
|
|
491
|
+ LoginTime:currenttime
|
|
|
492
|
+ },
|
|
|
493
|
+ success: function(data) {
|
|
|
494
|
+ if(data.state == "success") {
|
|
|
495
|
+ layer.msg('发送成功')
|
|
|
496
|
+ verifi();
|
|
|
497
|
+ }
|
|
|
498
|
+ }
|
|
|
499
|
+ });
|
|
|
500
|
+ }
|
|
|
501
|
+
|
|
|
502
|
+ function verifi() {
|
|
|
503
|
+ var time = 60;
|
|
|
504
|
+ var timer = null;
|
|
|
505
|
+ $('.btnVerifi').text(time + '秒后重新发送');
|
|
|
506
|
+ $('.btnVerifi').attr('disabled', 'disabled'); // 禁用按钮
|
|
|
507
|
+ $('.btnVerifi_user').text(time + '秒后重新发送');
|
|
|
508
|
+ $('.btnVerifi_user').attr('disabled', 'disabled'); // 禁用按钮
|
|
|
509
|
+ timer = setInterval(function() {
|
|
|
510
|
+ // 定时器到底了 兄弟们回家啦
|
|
|
511
|
+ if(time == 1) {
|
|
|
512
|
+ clearInterval(timer);
|
|
|
513
|
+ $('.btnVerifi').text("获取验证码")
|
|
|
514
|
+ $('.btnVerifi_user').text('获取验证码')
|
|
|
515
|
+ $('.btnVerifi').removeAttr('disabled')
|
|
|
516
|
+ $('.btnVerifi_user').removeAttr('disabled')
|
|
|
517
|
+
|
|
|
518
|
+ } else {
|
|
|
519
|
+
|
|
|
520
|
+ time--;
|
|
|
521
|
+ $('.btnVerifi').text(time + '秒后重新发送');
|
|
|
522
|
+ $('.btnVerifi_user').text(time + '秒后重新发送');
|
|
|
523
|
+
|
|
|
524
|
+ }
|
|
|
525
|
+ }, 1000)
|
|
|
526
|
+ }
|
|
|
527
|
+
|
|
|
528
|
+ function CurentTime() {
|
|
|
529
|
+ var now = new Date();
|
|
|
530
|
+
|
|
|
531
|
+ var year = now.getFullYear(); //年
|
|
|
532
|
+ var month = now.getMonth() + 1; //月
|
|
|
533
|
+ var day = now.getDate(); //日
|
|
|
534
|
+
|
|
|
535
|
+ var hh = now.getHours(); //时
|
|
|
536
|
+ var mm = now.getMinutes(); //分
|
|
|
537
|
+ var ss = now.getSeconds(); //秒
|
|
|
538
|
+
|
|
|
539
|
+ var clock = year + "-";
|
|
|
540
|
+
|
|
|
541
|
+ if(month < 10)
|
|
|
542
|
+ clock += "0";
|
|
|
543
|
+
|
|
|
544
|
+ clock += month + "-";
|
|
|
545
|
+
|
|
|
546
|
+ if(day < 10)
|
|
|
547
|
+ clock += "0";
|
|
|
548
|
+
|
|
|
549
|
+ clock += day + " ";
|
|
|
550
|
+
|
|
|
551
|
+ if(hh < 10)
|
|
|
552
|
+ clock += "0";
|
|
|
553
|
+
|
|
|
554
|
+ clock += hh + ":";
|
|
|
555
|
+ if(mm < 10) clock += '0';
|
|
|
556
|
+ clock += mm + ":";
|
|
|
557
|
+ if(ss < 10) clock += '0';
|
|
|
558
|
+ clock += ss;
|
|
|
559
|
+ return(clock);
|
|
|
560
|
+ }
|
|
|
561
|
+
|
|
|
562
|
+ function loginHref(){
|
|
|
563
|
+ var thisUrl = window.document.location.href
|
|
|
564
|
+ var toHrefUrl =""
|
|
|
565
|
+
|
|
|
566
|
+ if (thisUrl.indexOf("127.0.0.1") >0) {
|
|
|
567
|
+ toHrefUrl = "home.html"
|
|
|
568
|
+ } else{
|
|
|
569
|
+ toHrefUrl = thisUrl.split('/')
|
|
|
570
|
+ toHrefUrl.pop();
|
|
|
571
|
+ toHrefUrl = toHrefUrl.join("/")+ "/home.html"
|
|
|
572
|
+ }
|
|
|
573
|
+ if (huayi.config.callcenter_url.indexOf("https") !==-1) {
|
|
|
574
|
+ $.getJSON(
|
|
|
575
|
+ huayi.config.callcenter_url + "UserAccount/GetNowUser", {
|
|
|
576
|
+ token: $.cookie("token"),
|
|
|
577
|
+ },
|
|
|
578
|
+ function(result) {
|
|
|
579
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
580
|
+ if (result.data.role.F_RoleCode ==="spdbzy") {
|
|
|
581
|
+ toHrefUrl = "https://12345rx.zwfw.anyang.gov.cn/home.html"
|
|
|
582
|
+ }else{
|
|
|
583
|
+ toHrefUrl = "http://12345rx.zwfw.anyang.gov.cn/home.html"
|
|
|
584
|
+ }
|
|
|
585
|
+ window.location.href = toHrefUrl;
|
|
|
586
|
+ }
|
|
|
587
|
+ })
|
|
|
588
|
+ }else{
|
|
|
589
|
+ window.location.href = toHrefUrl;
|
|
|
590
|
+ }
|
|
|
591
|
+ }
|
|
|
592
|
+ })
|
|
|
593
|
+ </script>
|
|
|
594
|
+ </body>
|
|
|
595
|
+
|
|
|
596
|
+</html>
|