Parcourir la Source

短信验证码登录

miaofuhao il y a 4 ans
Parent
commit
76b230157f

+ 212 - 0
WebUI/CallCenterWeb.UI/css/login.css

@@ -0,0 +1,212 @@
1
+html {
2
+	margin: 0 auto;
3
+	padding: 0;
4
+	height: 100%;
5
+}
6
+
7
+body {
8
+	height: 100%;
9
+	background: #fff;
10
+}
11
+input::-webkit-outer-spin-button,
12
+input::-webkit-inner-spin-button {
13
+    -webkit-appearance: none;
14
+}
15
+input[type="number"]{
16
+    -moz-appearance: textfield;
17
+}
18
+
19
+.wrap {
20
+	width: 100%;
21
+	height: 100%;
22
+}
23
+
24
+.wrap_right {
25
+	float: left;
26
+	width: 50%;
27
+	height: 100%;
28
+}
29
+
30
+.wrap_left {
31
+	float: left;
32
+	width: 50%;
33
+	height: 100%;
34
+}
35
+
36
+.wrap_right {
37
+	position: relative;
38
+}
39
+
40
+.wrap_bj {
41
+	width: 100%;
42
+	height: 100%;
43
+	background: url(../img/left_amg_01.jpg) no-repeat;
44
+	background-size: 100% 100%;
45
+}
46
+
47
+.tab_box {
48
+	border: 1px solid #41caf2;
49
+	border-top-right-radius: 15px;
50
+	border-bottom-left-radius: 15px;
51
+	margin: 50px auto 65px;
52
+	padding: 0;
53
+	overflow: hidden;
54
+	width: 410px;
55
+}
56
+
57
+.tab_box ul {
58
+	list-style: none;
59
+	margin: 0;
60
+	padding: 0;
61
+	width: 100%;
62
+	height: 50px;
63
+	line-height: 50px;
64
+	font-size: 16px;
65
+	color: #41caf2;
66
+	border-bottom: 1px solid #41caf2;
67
+	text-align: center;
68
+}
69
+
70
+.tab_box ul li {
71
+	width: 50%;
72
+	float: left;
73
+}
74
+
75
+.active {
76
+	background: #41caf2;
77
+	color: #fff;
78
+}
79
+
80
+.tab_content {
81
+	margin: 57px 0 35px 0;
82
+}
83
+
84
+.tab_content div p {
85
+	width: 80%;
86
+	margin: 0 auto;
87
+	height: 35px;
88
+	border: 1px solid #41caf2;
89
+	border-radius: 15px;
90
+	margin-bottom: 25px;
91
+	line-height: 30px;
92
+	padding-left: 20px;
93
+}
94
+
95
+.tab_content div p input {
96
+	width: 75%;
97
+	border: 0;
98
+	font-size: 16px;
99
+	outline: none;
100
+	font-family: "仿宋", "宋体";
101
+}
102
+.tab_content div p .verification, .tab_content div p .verification_user {
103
+	width: 50%;
104
+	
105
+}
106
+.tab_content div p .btnVerifi, .tab_content div p .btnVerifi_user{
107
+	width: 37%;
108
+	border: 0;
109
+	height: 33px;
110
+	border-radius: 0px 15px 15px 0px;
111
+	font-size: 16px;
112
+	outline: none;
113
+	font-family: "仿宋", "宋体";
114
+	background: #41caf2;
115
+	color: #FFFFFF;
116
+}
117
+
118
+
119
+.login_icon {
120
+	display: inline-block;
121
+	width: 17px;
122
+	height: 19px;
123
+	vertical-align: middle;
124
+	margin-right: 15px;
125
+}
126
+
127
+.login_icon_user {
128
+	background: url(../img/login_user.png) no-repeat;
129
+}
130
+
131
+.login_icon_lock {
132
+	background: url(../img/login_lock.png) no-repeat;
133
+}
134
+
135
+.login_icon_hua {
136
+	background: url(../img/login_hua.png) no-repeat;
137
+}
138
+
139
+.login_go {
140
+	text-align: center;
141
+	padding: 0!important;
142
+	font-size: 16px;
143
+	letter-spacing: 16px;
144
+	font-family: "仿宋", "宋体";
145
+	color: #fff;
146
+	filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#1f90ec, endcolorstr=#1cb5ef, gradientType=1);
147
+	background: -webkit-gradient(li near, 0 0, 100% 0, from(#1f90ec), to(#1cb5ef));
148
+	background: -webkit-linear-gradient(left, #1f90ec, #1cb5ef);
149
+	background: -moz-linear-gradient(left, #1f90ec, #1cb5ef);
150
+	background: -o-linear-gradient(left, #1f90ec, #1cb5ef);
151
+	background: linear-gradient(left, #1f90ec, #1cb5ef);
152
+	cursor: pointer;
153
+}
154
+
155
+.error {
156
+	height: 13px;
157
+	background: url(../img/yz.png) no-repeat 0 -8px;
158
+	display: none;
159
+}
160
+
161
+.errorShow {
162
+	display: inline-block;
163
+}
164
+
165
+.rightCon {
166
+	width: 100%;
167
+	position: absolute;
168
+	top: 0;
169
+	bottom: 0;
170
+	right: 0;
171
+	left: 0;
172
+	margin: auto;
173
+	height: 600px;
174
+}
175
+
176
+.leftCon {
177
+	width: 30%;
178
+	position: absolute;
179
+	top: 41%;
180
+	bottom: 0;
181
+	right: 0;
182
+	left: 50%;
183
+	margin: auto;
184
+}
185
+
186
+.leftCon img {
187
+	width: 100%;
188
+}
189
+
190
+.leftCon p {
191
+	font-size: 28px;
192
+	letter-spacing: 10px;
193
+	color: #e60111;
194
+	line-height: 80px;
195
+}
196
+
197
+.service {
198
+	width: 100%;
199
+	position: absolute;
200
+	bottom: 30px;
201
+}
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+

+ 96 - 167
WebUI/CallCenterWeb.UI/login.html

@@ -9,168 +9,9 @@
9 9
 		<meta name="description">
10 10
 		<meta name="renderer" content="webkit">
11 11
 		<link rel="shortcut icon" href="img/32.ico" />
12
-		<script src="./Script/Common/huayi.load.js"></script>
13
-		<script src="./Script/Common/huayi.config.js"></script>
14 12
 		<link rel="stylesheet" href="./css/init.css" />
15
-		<script src="./js/jquery.md5.js"></script>
16
-		<script src="./js/aes/crypto-js.js"></script>
17
-		<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;
69
-				text-align: center;
70
-			}
71
-			.tab_box ul li {
72
-				width: 50%;
73
-				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
-				
172
-			}
173
-		</style>
13
+		<link rel="stylesheet" href="css/login.css" />
14
+		
174 15
 	</head>
175 16
 	<body class="signin">
176 17
 		<div class="wrap clearfix">
@@ -208,7 +49,16 @@
208 49
 								<p>
209 50
 									<i class="login_icon login_icon_lock "></i>
210 51
 									<input class="zx_psw" type="password" placeholder="请输入您的密码" />
211
-									<i class="login_icon error error_zx error_zx_psw"></i>
52
+									
53
+								</p>
54
+								<p>
55
+									<i class="login_icon login_icon_hua "></i>
56
+									<input class="mobile" type="number" placeholder="请输入手机号" />
57
+								</p>
58
+								<p>
59
+									<i class="login_icon login_icon_hua "></i>
60
+									<input class="verification" type="number" placeholder="请输入验证码" />
61
+									<button class="btnVerifi" type="button">获取验证码</button>
212 62
 								</p>
213 63
 								<p class="login_go login_zx">登录</p>
214 64
 							</div>
@@ -223,6 +73,15 @@
223 73
 									<input class="gl_psw" type="password" placeholder="请输入您的密码" />
224 74
 									<i class="login_icon error error_gl error_gl_psw"></i>
225 75
 								</p>
76
+								<p>
77
+									<i class="login_icon login_icon_hua "></i>
78
+									<input class="mobile_user" type="text" placeholder="请输入手机号" />
79
+								</p>
80
+								<p>
81
+									<i class="login_icon login_icon_hua "></i>
82
+									<input class="verification_user" type="text" placeholder="请输入验证码" />
83
+									<button class="btnVerifi_user" type="button">获取验证码</button>
84
+								</p>
226 85
 								<p class="login_go login_gl">登录</p>
227 86
 							</div>
228 87
 						</div>
@@ -240,6 +99,10 @@
240 99
 			</div>
241 100
 
242 101
 		</div>
102
+		<script src="./Script/Common/huayi.load.js"></script>
103
+		<script src="./Script/Common/huayi.config.js"></script>
104
+		<script src="./js/jquery.md5.js"></script>
105
+		<script src="./js/aes/crypto-js.js"></script>
243 106
 		<script>
244 107
 			$(function() {
245 108
 				var a=0;
@@ -300,7 +163,9 @@
300 163
 								username: zx_user,
301 164
 								extensionphone: zx_fj,
302 165
 								LoginTime:currenttime,
303
-								password:encrypted.toString()
166
+								password:encrypted.toString(),
167
+								Mobile:$(".mobile").val(),
168
+								Code:$(".verification").val()
304 169
 							},
305 170
 							success: function(data) {
306 171
 								/*验证请求*/
@@ -327,6 +192,7 @@
327 192
 					}
328 193
 
329 194
 				})
195
+				
330 196
 				function CurentTime(){ 
331 197
 			        var now = new Date();
332 198
 			       
@@ -360,6 +226,7 @@
360 226
 			        clock += ss; 
361 227
 			        return(clock); 
362 228
 			    }
229
+				
363 230
 				//用户登录
364 231
 				$('.login_gl').click(function() {
365 232
 					var gl_user = $(".gl_user").val();
@@ -379,9 +246,7 @@
379 246
 						var key = CryptoJS.enc.Utf8.parse(")O[9d]6,YF}+efcaj{+8>Z'e9M"+datatime);
380 247
 						var gl_psw = CryptoJS.enc.Utf8.parse($.md5(gl_psw));
381 248
 						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;
249
+						
385 250
 						/*请求后台*/
386 251
 						$.ajax({
387 252
 							type: "post",
@@ -391,7 +256,9 @@
391 256
 							data: {
392 257
 								username: gl_user,
393 258
 								password: encrypted.toString(),
394
-								LoginTime:currenttime
259
+								LoginTime:currenttime,
260
+								Mobile:$(".mobile_user").val(),
261
+								Code:$(".verification_user").val()
395 262
 							},
396 263
 							success: function(data) {
397 264
 								/*验证请求*/
@@ -413,6 +280,68 @@
413 280
 					}
414 281
 
415 282
 				})
283
+				
284
+				$(".btnVerifi").click(function(){
285
+					var myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/;
286
+				    if (!myreg.test($(".mobile").val())) {
287
+				       layer.msg($(".mobile").val())
288
+				      return false;
289
+				    }
290
+				    var mobile = $(".mobile").val();
291
+				    sendMsg(mobile);
292
+				})
293
+				
294
+				$(".btnVerifi_user").click(function(){
295
+					var myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/;
296
+					debugger
297
+				    if (!myreg.test($(".mobile_user").val())) {
298
+				       layer.msg($(".mobile_user").val())
299
+				      return false;
300
+				    }
301
+				    var mobile = $(".mobile_user").val();
302
+				    sendMsg(mobile)
303
+					
304
+				})
305
+				
306
+				function sendMsg(mobile){
307
+					console.log(mobile)
308
+					$.ajax({
309
+						type:"post",
310
+						url:huayi.config.callcenter_url+"Login/SendCode",
311
+						async:true,
312
+						dataType:'json',
313
+						data:{
314
+							mobile:mobile
315
+						},
316
+						success:function(data){
317
+							if (data.state == "success") {
318
+								layer.msg('发送成功')
319
+								verifi();
320
+							}
321
+						}
322
+					});
323
+				}
324
+				
325
+				function verifi(){
326
+		          	var time = 60;
327
+		          	var timer = null;
328
+		          	$('.btnVerifi').text(time + '秒后重新发送');
329
+		          	$('.btnVerifi').attr('disabled', 'disabled');  // 禁用按钮
330
+		          
331
+		          	timer = setInterval(function(){ 
332
+			            // 定时器到底了 兄弟们回家啦
333
+			            if(time == 1){
334
+			              clearInterval(timer);       
335
+			              $('.btnVerifi').text("获取验证码")
336
+			              $('.btnVerifi').removeAttr('disabled')
337
+			             
338
+			            }else{
339
+			              time--;
340
+			              $('.btnVerifi').text(time + '秒后重新发送');
341
+			            }
342
+			        }, 1000)
343
+							
344
+				}
416 345
 
417 346
 			})
418 347
 		</script>

+ 61 - 0
商丘WebAPP/User-login.html

@@ -26,7 +26,18 @@
26 26
 					<label><span class="mui-icon iconfont icon-suo"></span></label>
27 27
 					<input id="password" type="password" class=" mui-input-password mui-input" placeholder="请输入密码">
28 28
 				</div>
29
+        <div class="mui-input-row">
30
+        	<label><span class="mui-icon iconfont icon-yonghu"></span></label>
31
+        	<input id="mobile" type="number" class="mui-input-clear mui-input" placeholder="请输入手机号">
32
+        </div>
33
+        <div class="mui-input-row">
34
+        	<label><span class="mui-icon iconfont icon-yonghu"></span></label>
35
+        	<input id="mobileCode" type="text" class="mui-input-clear mui-input" placeholder="请输入验证码">
36
+        </div>
29 37
 			</form>
38
+      <div class="mui-content-padded">
39
+      	<button id="sendCode" class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">获取验证码</button>
40
+      </div>
30 41
 			<div class="mui-content-padded">
31 42
 				<button id="login" class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
32 43
 			</div>
@@ -45,17 +56,67 @@
45 56
 			mui.plusReady(function() {
46 57
 				var usercode = localStorage.getItem("user1"); //获取本地存储
47 58
 				var psw1 = localStorage.getItem("psw1"); //获取本地存储
59
+        function fn(){
60
+          var oBtn = document.getElementById('sendCode');
61
+          var time = 60;
62
+          var timer = null;
63
+          oBtn.innerHTML = time + '秒后重新发送';
64
+          oBtn.setAttribute('disabled', 'disabled');  // 禁用按钮
65
+          
66
+          timer = setInterval(function(){ 
67
+            // 定时器到底了 兄弟们回家啦
68
+            if(time == 1){
69
+              clearInterval(timer);       
70
+              oBtn.innerHTML = '获取验证码';  
71
+              oBtn.removeAttribute('disabled'); 
72
+             
73
+            }else{
74
+              time--;
75
+              oBtn.innerHTML = time + '秒后重新发送';
76
+            }
77
+          }, 1000)
78
+        }
79
+        
48 80
 				if (usercode != null) //如果缓存中有数据,则加载出来 
49 81
 				{
50 82
 					document.getElementById("account").value = usercode;
51 83
 					document.getElementById("password").value = localStorage.getItem("psw1");
52 84
 				}
85
+        document.getElementById("sendCode").addEventListener('tap',function(){
86
+          var mobile = document.getElementById('mobile').value;
87
+          var regular = /^[1][3,4,5,7,8,9][0-9]{9}$/;
88
+          fn();
89
+          return
90
+          if (!regular.test(mobile)) {
91
+            plus.nativeUI.toast("手机号格式不正确")
92
+            return false;
93
+          }
94
+          var data = {
95
+            "mobile":mobile
96
+          }
97
+          mui.ajax(huayi.config.callcenter_url+'/Login/SendCode',{
98
+            data:data,
99
+            dataType:'json',
100
+            type:'post',
101
+            timeout:10000,
102
+            success:function(data){
103
+              if(data.state == "success"){
104
+                plus.nativeUI.toast('发送成功')
105
+                fn();
106
+              }
107
+            }
108
+          })
109
+        })
53 110
 				document.getElementById("login").addEventListener('tap', function() {
54 111
 					var usercode = document.getElementById('account').value;
55 112
 					var password = document.getElementById('password').value;
113
+          var mobile = document.getElementById('mobile').value;
114
+          var mobileCode = document.getElementById('mobileCode').value;
56 115
 					var data = {
57 116
 						"usercode": usercode,
58 117
 						"password": $.md5(password),
118
+            "Mobile":mobile,
119
+            "Code":mobileCode
59 120
 					};
60 121
 					if (!usercode) {
61 122
 

+ 3 - 3
商丘WebAPP/css/login.css

@@ -122,8 +122,8 @@ body {
122 122
 
123 123
 .mui-logo-box {
124 124
 	text-align: center;
125
-	padding-top: 80px;
126
-	margin-bottom: 50px;
125
+	padding-top: 50px;
126
+	
127 127
 }
128 128
 
129 129
 .mui-logo-box img {
@@ -173,7 +173,7 @@ input {
173 173
 	margin-top: 30px;
174 174
 }
175 175
 
176
-#login {
176
+#login,#sendCode {
177 177
 	border-radius: 20px;
178 178
 }
179 179
 

+ 10 - 0
商丘WebAPP/css/personal.css

@@ -326,3 +326,13 @@ body {
326 326
 .font-weight-bold{
327 327
 	font-weight: bold;
328 328
 }
329
+.stateIcon {
330
+	position: absolute;
331
+	right: 6px;
332
+	top: 6px;
333
+	height: 20px;
334
+	color: #FF1B41;
335
+	border-radius: 10px;
336
+	font-size: 14px;
337
+	font-weight: bold;
338
+}

+ 76 - 7
商丘WebAPP/login.html

@@ -13,7 +13,7 @@
13 13
 	<body>
14 14
 
15 15
 		<div class="mui-content">
16
-			<form id='login-form' class="mui-input-group">
16
+			<form id="login-form" class="mui-input-group">
17 17
 				<!--logo-->
18 18
 				<div class="mui-logo-box">
19 19
 					<div>
@@ -22,15 +22,27 @@
22 22
 				</div>
23 23
 				<div class="mui-input-row">
24 24
 					<label><span class="mui-icon iconfont icon-yonghu"></span></label>
25
-					<input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
25
+					<input id="account" type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
26 26
 				</div>
27
+        
27 28
 				<div class="mui-input-row mui-password">
28 29
 					<label><span class="mui-icon iconfont icon-suo"></span></label>
29
-					<input id='password' type="password" class=" mui-input-password mui-input" placeholder="请输入密码">
30
+					<input id="password" type="password" class=" mui-input-password mui-input" placeholder="请输入密码">
30 31
 				</div>
32
+        <div class="mui-input-row">
33
+        	<label><span class="mui-icon iconfont icon-yonghu"></span></label>
34
+        	<input id="mobile" type="text" class="mui-input-clear mui-input" placeholder="请输入手机号">
35
+        </div>
36
+        <div class="mui-input-row">
37
+        	<label><span class="mui-icon iconfont icon-yonghu"></span></label>
38
+        	<input id="mobileCode" type="text" class="mui-input-clear mui-input" placeholder="请输入验证码">
39
+        </div>
31 40
 			</form>
41
+      <div class="mui-content-padded">
42
+      	<button id="sendCode" class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">获取验证码</button>
43
+      </div>
32 44
 			<div class="mui-content-padded">
33
-				<button id='login' class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
45
+				<button id="login" class="mui-btn mui-btn-block mui-btn-primary" style="font-size: 16px;">登录</button>
34 46
 			</div>
35 47
 			<div class="mui-content-padded oauth-area" style="width: 100%;  margin-top: 30px;">
36 48
 				<a href="User-login.html" class="reg_href" style="width: 100%;">我是市民</a>		
@@ -44,26 +56,83 @@
44 56
 		<script>
45 57
 			mui.init();
46 58
 			mui.plusReady(function() {
59
+        
47 60
 				var usercode = localStorage.getItem("user"); //获取本地存储
48 61
 				var psw = localStorage.getItem("psw"); //获取本地存储s
62
+        var regular = /^[1][3,4,5,7,8,9][0-9]{9}$/;
49 63
 				if(usercode != null) //如果缓存中有数据,则加载出来 
50 64
 				{
51 65
 					document.getElementById("account").value = usercode;
52 66
 					document.getElementById("password").value = localStorage.getItem("psw");
53 67
 				}
68
+        function fn(){
69
+          var oBtn = document.getElementById('sendCode');
70
+          var time = 60;
71
+          var timer = null;
72
+          oBtn.innerHTML = time + '秒后重新发送';
73
+          oBtn.setAttribute('disabled', 'disabled');  // 禁用按钮
74
+          
75
+          timer = setInterval(function(){ 
76
+            // 定时器到底了 兄弟们回家啦
77
+            if(time == 1){
78
+              clearInterval(timer);       
79
+              oBtn.innerHTML = '获取验证码';  
80
+              oBtn.removeAttribute('disabled'); 
81
+             
82
+            }else{
83
+              time--;
84
+              oBtn.innerHTML = time + '秒后重新发送';
85
+            }
86
+          }, 1000)
87
+        }
88
+        document.getElementById("sendCode").addEventListener('tap',function(){
89
+          var mobile = document.getElementById('mobile').value;
90
+          
91
+          
92
+          
93
+          if (!regular.test(mobile)) {
94
+            plus.nativeUI.toast("手机号格式不正确")
95
+            return false;
96
+          }
97
+          var data = {
98
+            "mobile":mobile
99
+          }
100
+          mui.ajax(huayi.config.callcenter_url+'/Login/SendCode',{
101
+            data:data,
102
+            dataType:'json',
103
+            type:'post',
104
+            timeout:10000,
105
+            success:function(data){
106
+              if(data.state == "success"){
107
+                plus.nativeUI.toast('发送成功')
108
+                fn();
109
+              }
110
+            }
111
+          })
112
+        })
54 113
 				document.getElementById("login").addEventListener('tap', function() {
55 114
 					var username = document.getElementById('account').value;
56 115
 					var password = document.getElementById('password').value;
116
+          var mobile = document.getElementById('mobile').value;
117
+          var mobileCode = document.getElementById('mobileCode').value;
57 118
 					var data = {
58 119
 						"username": username,
59 120
 						"password": $.md5(password),
60
-						" extensionphone": 1
121
+						"extensionphone": 1,
122
+            "Mobile":mobile,
123
+						"Code":mobileCode
61 124
 					};
62
-					if(!username) {
125
+          if(!username) {
63 126
 						plus.nativeUI.toast('输入账号');
64 127
 					} else if(!password) {
65 128
 						plus.nativeUI.toast('密码不能为空');
66
-					} else {
129
+					} else if (!regular.test(mobile)) {
130
+            plus.nativeUI.toast("手机号格式不正确")
131
+            return false;
132
+          } else if(!mobileCode){
133
+            plus.nativeUI.toast("请输入验证码")
134
+            return false;
135
+          } else {
67 136
 						if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
68 137
 							mui.toast("网络连接中断!");
69 138
 						}

+ 3 - 1
商丘WebAPP/manifest.json

@@ -71,7 +71,9 @@
71 71
         "Camera" : {},
72 72
         "Audio" : {},
73 73
         "Device" : {},
74
-        "Contacts" : {}
74
+        "Contacts" : {},
75
+        "Webview-x5" : {},
76
+        "VideoPlayer" : {}
75 77
     },
76 78
     "plus" : {
77 79
         "splashscreen" : {

+ 118 - 6
商丘WebAPP/personal.html

@@ -47,30 +47,35 @@
47 47
 								<div class="Icon icon-1"><i  class="mui-icon iconfont icon-dengdai2"></i></div>
48 48
 								<div class="mui-media-body font-weight-bold">待交办</div>
49 49
 							</a>
50
+              <div class="stateIcon spllddcl"></div>
50 51
 						</li>
51 52
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
52 53
 							<a href="javascript:;" class="Dispatch-listDCL" data-index="0" index="3">
53 54
 								<div class="Icon icon-2"><i class="mui-icon iconfont icon-hui "></i></div>
54 55
 								<div class="mui-media-body font-weight-bold">退回审核</div>
55 56
 							</a>
57
+              <div class="stateIcon splthsh"></div>
56 58
 						</li>
57 59
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
58 60
 							<a href="javascript:;" class="Dispatch-listDCL" data-index="0" index="5">
59 61
 								<div class="Icon icon-3"><i class="mui-icon iconfont icon-dengdai3 "></i></div>
60 62
 								<div class="mui-media-body font-weight-bold">延时审核</div>
61
-							</a>
63
+              </a>
64
+              <div class="stateIcon sqlyssh"></div>
62 65
 						</li>						
63 66
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
64 67
 							<a href="javascript:;" class="Dispatch-listDCL" data-index="0" index="11" issatisfie="0">
65 68
 								<div class="Icon icon-7"><i class="mui-icon iconfont  icon-daiban"></i></div>
66
-								<div class="mui-media-body font-weight-bold">重办待交办</div>
67
-							</a>
69
+								<div class="mui-media-body font-weight-bold">重办待交办</div>               
70
+              </a>
71
+              <div class="stateIcon sqlcbdjb"></div>
68 72
 						</li>
69 73
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
70 74
 							<a href="javascript:;" class="Dispatch-listYJB"  data-index="1">
71 75
 								<div class="Icon icon-6"><i class="mui-icon iconfont icon-yibanli "></i></div>
72
-								<div class="mui-media-body font-weight-bold">已交办</div>
73
-							</a>
76
+								<div class="mui-media-body font-weight-bold">已交办</div>							
77
+              </a>
78
+             
74 79
 						</li>
75 80
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
76 81
 							<a href="javascript:;" class="Seach" data-index="0">
@@ -86,30 +91,35 @@
86 91
 								<div class="Icon icon-1"><i class="mui-icon iconfont icon-check1 "></i></div>
87 92
 								<div class="mui-media-body font-weight-bold">待查收</div>
88 93
 							</a>
94
+              <div class="stateIcon dwdcs"></div>
89 95
 						</li>
90 96
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
91 97
 							<a href="javascript:;" class="Undertake-list" data-index="0" index="4">
92 98
 								<div class="Icon icon-2"><i class="mui-icon iconfont icon-daibanli "></i></div>
93 99
 								<div class="mui-media-body font-weight-bold">待办理</div>
94 100
 							</a>
101
+              <div class="stateIcon dwdbl"></div>
95 102
 						</li>					
96 103
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
97 104
 							<a href="javascript:;" class="Undertake-listYBL">
98 105
 								<div class="Icon icon-7"><i class="mui-icon iconfont icon-yibanli "></i></div>
99 106
 								<div class="mui-media-body font-weight-bold">已办理</div>
100 107
 							</a>
108
+              
101 109
 						</li>
102 110
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
103 111
 							<a href="javascript:;" class="Undertake-list" data-index="2">
104 112
 								<div class="Icon icon-3"><i class="mui-icon iconfont icon-gongyonghuishou "></i></div>
105 113
 								<div class="mui-media-body font-weight-bold">退回审核</div>
106 114
 							</a>
115
+              <div class="stateIcon dwthsh"></div>
107 116
 						</li>
108 117
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
109 118
 							<a href="javascript:;" class="Undertake-list" data-index="3">
110 119
 								<div class="Icon icon-4"><i class="mui-icon iconfont icon-gaojing "></i></div>
111 120
 								<div class="mui-media-body font-weight-bold">延时审核</div>
112 121
 							</a>
122
+              <div class="stateIcon dwyssh"></div>
113 123
 						</li>
114 124
 						
115 125
 						
@@ -121,12 +131,14 @@
121 131
 								<div class="Icon icon-2"><i class="mui-icon iconfont icon-daibanli "></i></div>
122 132
 								<div class="mui-media-body font-weight-bold">待办理</div>
123 133
 							</a>
134
+              <div class="stateIcon ejdbl"></div>
124 135
 						</li>
125 136
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
126 137
 							<a href="javascript:;" class="Dispatch-list1" data-index="1">
127 138
 								<div class="Icon icon-7"><i class="mui-icon iconfont icon-yibanli "></i></div>
128 139
 								<div class="mui-media-body font-weight-bold">已办理</div>
129 140
 							</a>
141
+              <div class="stateIcon ejybl"></div>
130 142
 						</li>
131 143
 					</ul>
132 144
 					<!--督办专员-->
@@ -136,12 +148,14 @@
136 148
 								<div class="Icon icon-2"><i class="mui-icon iconfont icon-daibanli "></i></div>
137 149
 								<div class="mui-media-body font-weight-bold">待督办</div>
138 150
 							</a>
151
+              <div class="stateIcon DTJ"></div>
139 152
 						</li>
140 153
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
141 154
 							<a href="javascript:;" class="Supervision-list" data-index="6">
142 155
 								<div class="Icon icon-7"><i class="mui-icon iconfont icon-yibanli "></i></div>
143 156
 								<div class="mui-media-body font-weight-bold">已督办</div>
144 157
 							</a>
158
+              <div class="stateIcon DTJ"></div>
145 159
 						</li>
146 160
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
147 161
 							<a href="javascript:;" class="Seach" data-index="0">
@@ -149,6 +163,7 @@
149 163
 								<div class="mui-media-body font-weight-bold">工单查询</div>
150 164
 							</a>
151 165
 						</li>
166
+            <div class="stateIcon DTJ"></div>
152 167
 					</ul>
153 168
 					<!--督办专员-->
154 169
 					<ul class="mui-table-view mui-grid-view mui-grid-9 Common-box party" style="display: none;">
@@ -157,6 +172,7 @@
157 172
 								<div class="Icon icon-2"><i class="mui-icon iconfont icon-check1 "></i></div>
158 173
 								<div class="mui-media-body font-weight-bold">添加工单</div>
159 174
 							</a>
175
+              <div class="stateIcon DTJ"></div>
160 176
 						</li>
161 177
 						
162 178
 						<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
@@ -223,7 +239,11 @@
223 239
 	<script>
224 240
 		mui.init();
225 241
 		mui.plusReady(function() {
242
+      
243
+      //setInterval(function() {ajaxRefresh()},60*1000);
226 244
 			var token = localStorage.getItem("token"); //获取本地存储
245
+      var usercode;
246
+      //alert(token)
227 247
 			//var token = localStorage.getItem("token")
228 248
 			//权限判断
229 249
 			mui.ajax(huayi.config.callcenter_url + '/UserAccount/GetNowUser', {
@@ -241,6 +261,9 @@
241 261
 					$(".F_UserName").text(data.data.user.F_UserName);
242 262
 					localStorage.setItem("F_UserName", data.data.user.F_UserName);
243 263
 					localStorage.setItem("F_UserName", data.data.user.F_UserName);
264
+          //alert(JSON.stringify(data.data.user.F_UserCode))
265
+          usercode = data.data.user.F_UserCode;
266
+          ajaxRefresh();
244 267
 					$(".rolname").text(data.data.user.rolname);
245 268
 					//alert(RoleCode)
246 269
 					if(RoleCode == "WLDW") { //承办
@@ -266,7 +289,7 @@
266 289
 				}
267 290
 
268 291
 			});
269
-//			一级查看-已交办页面
292
+      //一级查看-已交办页面
270 293
 			$('.Dispatch-listYJB').on('tap', function() {
271 294
 				var nwaiting = plus.nativeUI.showWaiting();
272 295
 				webviewShow = plus.webview.create("workOrder/Dispatch-index.html"); //后台创建webview并打开show.html  
@@ -275,6 +298,95 @@
275 298
 					webviewShow.show("slide-in-right", 300); //把新webview窗体显示出来,显示动画效果为速度300毫秒的右侧移入动画
276 299
 				}, false);
277 300
 			})
301
+      
302
+      function ajaxRefresh() {
303
+        //alert(usercode)
304
+       	//权限判断
305
+      	$.ajax({
306
+      		data: {
307
+      			usercode: usercode,
308
+      		},
309
+      		url: huayi.config.callcenter_url + '/APP/GetOrderCount',
310
+      		dataType: 'json', //服务器返回json格式数据
311
+      		type: 'get', //HTTP请求类型
312
+      		timeout: 10000, //超时时间设置为10秒;
313
+      		headers: {
314
+      			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
315
+      		},
316
+      		success: function(data) {
317
+            alert(JSON.stringify(data))
318
+            var data = data.data;
319
+            
320
+            //alert(data.spllddcl)
321
+            //一级待交办
322
+      			if(data.sqllddcl == 0) {
323
+      				$(".spllddcl").hide(); 
324
+      			} else {
325
+      				$(".spllddcl").text(data.sqllddcl); 
326
+      			}
327
+            //一级退回审核
328
+      			if(data.sqlthsh == 0) {
329
+      				$(".splthsh").hide(); 
330
+      			}  else {
331
+      				$(".splthsh").text(data.sqlthsh); 
332
+      			}
333
+            //一级延时审核
334
+      			if(data.sqlyssh == 0) {
335
+      				$(".sqlyssh").hide(); 
336
+      			} else {
337
+      				$(".sqlyssh").text(data.sqlyssh); 
338
+      			}
339
+            //一级重办待交办
340
+      			if(data.sqlcbdjb == 0) {
341
+      				$(".sqlcbdjb").hide(); 
342
+      			}  else {
343
+      				$(".sqlcbdjb").text(data.sqlcbdjb); 
344
+      			}
345
+            //二级待查收
346
+      			if(data.dwdcs == 0) {
347
+      				$(".dwdcs").hide(); 
348
+      			}  else {
349
+      				$(".dwdcs").text(data.dwdcs); 
350
+      			}
351
+            //二级待办理
352
+      			if(data.dwdbl == 0) {
353
+      				$(".dwdbl").hide(); 
354
+      			}  else {
355
+      				$(".dwdbl").text(data.dwdbl); 
356
+      			}
357
+            //二级退回审核
358
+      			if(data.dwthsh == 0) {
359
+      				$(".dwthsh").hide(); 
360
+      			}  else {
361
+      				$(".dwthsh").text(data.dwthsh); 
362
+      			}
363
+            //二级延时审核
364
+      			if(data.dwyssh == 0) {
365
+      				$(".dwyssh").hide(); 
366
+      			} else {
367
+      				$(".dwyssh").text(data.dwyssh); 
368
+      			}
369
+            //三级待办理
370
+      			if(data.ejdbl == 0) {
371
+      				$(".ejdbl").hide(); 
372
+      			}  else {
373
+      				$(".ejdbl").text(data.ejdbl); 
374
+      			}
375
+            //三级已办理
376
+      			if(data.ejybl == 0) {
377
+      				$(".ejybl").hide(); 
378
+      			}  else {
379
+      				$(".ejybl").text(data.ejybl); 
380
+      			}
381
+      			
382
+      		},
383
+      		error: function(xhr, type, errorThrown) {
384
+      			//异常处理;
385
+            alert(xhr+type,errorThrown)
386
+      		}
387
+      
388
+      	});
389
+      }
278 390
 			//一级查看-待处理列表 列表接口GetLDDealList
279 391
 			$(".Dispatch-listDCL").on('tap', function() {
280 392
 				var isdeal = $(this).attr('data-index'); //070