|
|
@@ -47,8 +47,8 @@
|
|
47
|
47
|
<span class="sr-only">Error:</span>
|
|
48
|
48
|
<span id="login_msg"></span>
|
|
49
|
49
|
</div>
|
|
50
|
|
- <button class="btns" type="button" disabled="disabled">登录</button>
|
|
51
|
|
- <!--<button class="btns" type="button" >登录</button>-->
|
|
|
50
|
+ <!--<button class="btns" type="button" disabled="disabled">登录</button>-->
|
|
|
51
|
+ <button class="btns" type="button">登录</button>
|
|
52
|
52
|
<div class="login_panel_footer">
|
|
53
|
53
|
<span class="footer_text">郑州 • 颐和</span>
|
|
54
|
54
|
</div>
|
|
|
@@ -81,9 +81,14 @@
|
|
81
|
81
|
$('#signin').find("input[class='form-control']").blur(function() {
|
|
82
|
82
|
$(this).parent().removeClass('active').siblings().removeClass('active')
|
|
83
|
83
|
});
|
|
|
84
|
+
|
|
|
85
|
+ $('.btns').click(function(){
|
|
|
86
|
+ login();
|
|
|
87
|
+ })
|
|
|
88
|
+ $(document).on('keypress', enterHanlde);
|
|
84
|
89
|
|
|
85
|
90
|
/*输入框绑定验证*/
|
|
86
|
|
- $('#signin').find("input[class='form-control']").on('focus input propertychange', valideInput);
|
|
|
91
|
+// $('#signin').find("input[class='form-control']").on('focus input propertychange', valideInput);
|
|
87
|
92
|
$('#user').trigger('propertychange');
|
|
88
|
93
|
$('#user').trigger('focus');
|
|
89
|
94
|
$('#user').trigger('input');
|
|
|
@@ -97,6 +102,8 @@
|
|
97
|
102
|
}else{
|
|
98
|
103
|
$('.layui-layer-btn a').trigger('click');
|
|
99
|
104
|
}
|
|
|
105
|
+// $('.btns:not(:disabled)').trigger("click");
|
|
|
106
|
+// $('.layui-layer-btn a').trigger('click');
|
|
100
|
107
|
}
|
|
101
|
108
|
}
|
|
102
|
109
|
|
|
|
@@ -156,9 +163,9 @@
|
|
156
|
163
|
closeBtn: 0,
|
|
157
|
164
|
btn: ['确定'], //按钮
|
|
158
|
165
|
}, function(index) {
|
|
159
|
|
- parent.$('.btns').attr("disabled", true);
|
|
160
|
|
- parent.$(document).off('click', '.btns', login);
|
|
161
|
|
- parent.$(document).off('keypress', enterHanlde);
|
|
|
166
|
+// parent.$('.btns').attr("disabled", true);
|
|
|
167
|
+// parent.$(document).off('click', '.btns', login);
|
|
|
168
|
+// parent.$(document).off('keypress', enterHanlde);
|
|
162
|
169
|
parent.layer.close(index);
|
|
163
|
170
|
parent.$('#user').trigger('focus');
|
|
164
|
171
|
});
|
|
|
@@ -199,74 +206,74 @@
|
|
199
|
206
|
}
|
|
200
|
207
|
|
|
201
|
208
|
//验证
|
|
202
|
|
- function valideInput() {
|
|
203
|
|
- var _that = $(this);
|
|
204
|
|
- var ele = $(this).attr('id');
|
|
205
|
|
- var isSeat = null;
|
|
206
|
|
- if($('#login_tab').find('li.active').text() === '坐席登录'){
|
|
207
|
|
- isSeat = true;
|
|
208
|
|
- }else{
|
|
209
|
|
- isSeat = false;
|
|
210
|
|
- }
|
|
211
|
|
- if(ele === 'user') {
|
|
212
|
|
- valideMethods(_that, regexs.userReg, '4-20个字符只能是字母、下划线、数字');
|
|
213
|
|
- } else if(ele === 'extensionNumber' && isSeat) {
|
|
214
|
|
- valideMethods(_that, regexs.num, '只能输入数字');
|
|
215
|
|
- } else if(ele === 'password') {
|
|
216
|
|
- valideMethods(_that, regexs.passwordReg, '6-32个字符只能是字母、下划线、数字');
|
|
217
|
|
- }
|
|
|
209
|
+// function valideInput() {
|
|
|
210
|
+// var _that = $(this);
|
|
|
211
|
+// var ele = $(this).attr('id');
|
|
|
212
|
+// var isSeat = null;
|
|
|
213
|
+// if($('#login_tab').find('li.active').text() === '坐席登录'){
|
|
|
214
|
+// isSeat = true;
|
|
|
215
|
+// }else{
|
|
|
216
|
+// isSeat = false;
|
|
|
217
|
+// }
|
|
|
218
|
+// if(ele === 'user') {
|
|
|
219
|
+// valideMethods(_that, regexs.userReg, '4-20个字符只能是字母、下划线、数字');
|
|
|
220
|
+// } else if(ele === 'extensionNumber' && isSeat) {
|
|
|
221
|
+// valideMethods(_that, regexs.num, '只能输入数字');
|
|
|
222
|
+// } else if(ele === 'password') {
|
|
|
223
|
+// valideMethods(_that, regexs.passwordReg, '6-32个字符只能是字母、下划线、数字');
|
|
|
224
|
+// }
|
|
218
|
225
|
|
|
219
|
|
- if(regexs.userReg.test($.trim($('#user').val())) && regexs.passwordReg.test($.trim($("#password").val()))) {
|
|
220
|
|
- if(isSeat){
|
|
221
|
|
- if(!$.trim($('#extensionNumber').val())){
|
|
222
|
|
- $('#login_tips').show();
|
|
223
|
|
- $('#login_msg').text('您还没有输入分机号!');
|
|
224
|
|
- $('.btns').attr("disabled", true);
|
|
225
|
|
- $(document).off('click', '.btns', login);
|
|
226
|
|
- $(document).off('keypress', enterHanlde);
|
|
227
|
|
- }else{
|
|
228
|
|
- if(regexs.nums.test($.trim($('#extensionNumber').val()))) {
|
|
229
|
|
- $('.btns').attr("disabled", false);
|
|
230
|
|
- $(document).off('click', '.btns', login);
|
|
231
|
|
- $(document).on('click', '.btns', login);
|
|
232
|
|
- $(document).off('keypress', enterHanlde);
|
|
233
|
|
- $(document).on('keypress', enterHanlde);
|
|
234
|
|
- } else {
|
|
235
|
|
- $('.btns').attr("disabled", true);
|
|
236
|
|
- $(document).off('click', '.btns', login);
|
|
237
|
|
- $(document).off('keypress', enterHanlde);
|
|
238
|
|
- }
|
|
239
|
|
- }
|
|
240
|
|
- }else{
|
|
241
|
|
- $('.btns').attr("disabled", false);
|
|
242
|
|
- $(document).off('click', '.btns', login);
|
|
243
|
|
- $(document).on('click', '.btns', login);
|
|
244
|
|
- $(document).off('keypress', enterHanlde);
|
|
245
|
|
- $(document).on('keypress', enterHanlde);
|
|
246
|
|
- }
|
|
247
|
|
- }
|
|
248
|
|
- }
|
|
|
226
|
+// if(regexs.userReg.test($.trim($('#user').val())) && regexs.passwordReg.test($.trim($("#password").val()))) {
|
|
|
227
|
+// if(isSeat){
|
|
|
228
|
+// if(!$.trim($('#extensionNumber').val())){
|
|
|
229
|
+// $('#login_tips').show();
|
|
|
230
|
+// $('#login_msg').text('您还没有输入分机号!');
|
|
|
231
|
+// $('.btns').attr("disabled", true);
|
|
|
232
|
+// $(document).off('click', '.btns', login);
|
|
|
233
|
+// $(document).off('keypress', enterHanlde);
|
|
|
234
|
+// }else{
|
|
|
235
|
+// if(regexs.nums.test($.trim($('#extensionNumber').val()))) {
|
|
|
236
|
+// $('.btns').attr("disabled", false);
|
|
|
237
|
+// $(document).off('click', '.btns', login);
|
|
|
238
|
+// $(document).on('click', '.btns', login);
|
|
|
239
|
+// $(document).off('keypress', enterHanlde);
|
|
|
240
|
+// $(document).on('keypress', enterHanlde);
|
|
|
241
|
+// } else {
|
|
|
242
|
+// $('.btns').attr("disabled", true);
|
|
|
243
|
+// $(document).off('click', '.btns', login);
|
|
|
244
|
+// $(document).off('keypress', enterHanlde);
|
|
|
245
|
+// }
|
|
|
246
|
+// }
|
|
|
247
|
+// }else{
|
|
|
248
|
+// $('.btns').attr("disabled", false);
|
|
|
249
|
+// $(document).off('click', '.btns', login);
|
|
|
250
|
+// $(document).on('click', '.btns', login);
|
|
|
251
|
+// $(document).off('keypress', enterHanlde);
|
|
|
252
|
+// $(document).on('keypress', enterHanlde);
|
|
|
253
|
+// }
|
|
|
254
|
+// }
|
|
|
255
|
+// }
|
|
249
|
256
|
/**
|
|
250
|
257
|
* 验证方法
|
|
251
|
258
|
* _this :传递的this
|
|
252
|
259
|
* regRlues: 验证的规则
|
|
253
|
260
|
* msg: 提示信息
|
|
254
|
261
|
* */
|
|
255
|
|
- function valideMethods(_this, regRlues, msg) {
|
|
256
|
|
- $('#login_tips').hide();
|
|
257
|
|
- $('#login_msg').text('');
|
|
258
|
|
- if(!regRlues.test($.trim(_this.val()))) {
|
|
259
|
|
- _this.parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
|
|
260
|
|
- _this.parent().find('.glyphicon').remove();
|
|
261
|
|
- $('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
|
|
262
|
|
- $('#login_tips').show();
|
|
263
|
|
- $('#login_msg').text(msg);
|
|
264
|
|
- } else {
|
|
265
|
|
- _this.parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
|
|
266
|
|
- _this.parent().find('.glyphicon').remove();
|
|
267
|
|
- $('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
|
|
268
|
|
- }
|
|
269
|
|
- }
|
|
|
262
|
+// function valideMethods(_this, regRlues, msg) {
|
|
|
263
|
+// $('#login_tips').hide();
|
|
|
264
|
+// $('#login_msg').text('');
|
|
|
265
|
+// if(!regRlues.test($.trim(_this.val()))) {
|
|
|
266
|
+// _this.parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
|
|
|
267
|
+// _this.parent().find('.glyphicon').remove();
|
|
|
268
|
+// $('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
|
|
|
269
|
+// $('#login_tips').show();
|
|
|
270
|
+// $('#login_msg').text(msg);
|
|
|
271
|
+// } else {
|
|
|
272
|
+// _this.parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
|
|
|
273
|
+// _this.parent().find('.glyphicon').remove();
|
|
|
274
|
+// $('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
|
|
|
275
|
+// }
|
|
|
276
|
+// }
|
|
270
|
277
|
|
|
271
|
278
|
//tab 切换
|
|
272
|
279
|
function tabChane(){
|
|
|
@@ -279,10 +286,6 @@
|
|
279
|
286
|
}
|
|
280
|
287
|
$('#user').trigger('focus');
|
|
281
|
288
|
}
|
|
282
|
|
-// 不要验证登陆
|
|
283
|
|
-// $('.btns').on('click',function(){
|
|
284
|
|
-// login();
|
|
285
|
|
-// })
|
|
286
|
289
|
</script>
|
|
287
|
290
|
</body>
|
|
288
|
291
|
|