Showing
10 changed files
with
40 additions
and
7 deletions
No preview for this file type
... | @@ -551,7 +551,7 @@ function initMatching(){ | ... | @@ -551,7 +551,7 @@ function initMatching(){ |
551 | } | 551 | } |
552 | if ($obj[0].tagName == "FORM") { | 552 | if ($obj[0].tagName == "FORM") { |
553 | $obj[0].disabled = false; | 553 | $obj[0].disabled = false; |
554 | - $obj.find("input[type='text'], button").attr('disabled', null); | 554 | + $obj.find("input[type='text'],input[type='password'],input[name='password'], button").attr('disabled', null); |
555 | 555 | ||
556 | var $but_input = $obj.find('[type=submit]'); | 556 | var $but_input = $obj.find('[type=submit]'); |
557 | if ($but_input.is('button')) { | 557 | if ($but_input.is('button')) { | ... | ... |
... | @@ -385,13 +385,19 @@ | ... | @@ -385,13 +385,19 @@ |
385 | 385 | ||
386 | 386 | ||
387 | that.$c.on('click', '[type=submit],.submit', function(e) { | 387 | that.$c.on('click', '[type=submit],.submit', function(e) { |
388 | + var passWordReg = /^[0-9a-zA-Z]+$/; | ||
388 | e.preventDefault(); | 389 | e.preventDefault(); |
389 | if(/[A-Z]/.test(that.$c.find("input[name='username']").val())){ | 390 | if(/[A-Z]/.test(that.$c.find("input[name='username']").val())){ |
390 | Core.showTips("账号不能有大写字母!"); | 391 | Core.showTips("账号不能有大写字母!"); |
391 | }else if(/[A-Z]/.test(that.$c.find("input[name='password']").val())){ | 392 | }else if(/[A-Z]/.test(that.$c.find("input[name='password']").val())){ |
392 | Core.showTips("密码不能有大写字母!"); | 393 | Core.showTips("密码不能有大写字母!"); |
394 | + }else if(that.$c.find("input[name='password']").val().length<6 || that.$c.find("input[name='password']").val().length>16){ | ||
395 | + Core.showTips("密码长度为6-16位字符!"); | ||
393 | }else if(!that.$c.find('.checkbox-2').length>0){ | 396 | }else if(!that.$c.find('.checkbox-2').length>0){ |
394 | Core.showTips('请同意'+Core.PLATFORM_NAME+'网络协议',1); | 397 | Core.showTips('请同意'+Core.PLATFORM_NAME+'网络协议',1); |
398 | + }else if(!passWordReg.test(that.$c.find("input[name='password']").val())){ | ||
399 | + Core.showTips('请输入数字字母组成的密码!', true); | ||
400 | + return false; | ||
395 | }else{ | 401 | }else{ |
396 | //如果是游客的话则调用安卓截屏方法 | 402 | //如果是游客的话则调用安卓截屏方法 |
397 | if (that.$c.find('[name="username"]').val() == that.$c.find('[name="old_usernmae"]').val() && window.android != undefined && window.android.screenShot != undefined ){ | 403 | if (that.$c.find('[name="username"]').val() == that.$c.find('[name="old_usernmae"]').val() && window.android != undefined && window.android.screenShot != undefined ){ |
... | @@ -599,9 +605,14 @@ | ... | @@ -599,9 +605,14 @@ |
599 | that.$c.on("click","#js_confirm_resetnewpsw",function(){ | 605 | that.$c.on("click","#js_confirm_resetnewpsw",function(){ |
600 | var NewPsw = that.$c.find("#js_reset_newpsw").val(), | 606 | var NewPsw = that.$c.find("#js_reset_newpsw").val(), |
601 | NewKey = that.$c.find("input[name='pwd_code']").val(), | 607 | NewKey = that.$c.find("input[name='pwd_code']").val(), |
608 | + passWordReg = /^[0-9a-zA-Z]+$/, | ||
602 | account = $("input[name='loginUserName']").val(); | 609 | account = $("input[name='loginUserName']").val(); |
603 | var names = localStorage.getItem('user_names'); | 610 | var names = localStorage.getItem('user_names'); |
604 | names = JSON.parse(names); | 611 | names = JSON.parse(names); |
612 | + if(!passWordReg.test(NewPsw)){ | ||
613 | + Core.showTips('请输入数字字母组成的密码!', true); | ||
614 | + return false; | ||
615 | + } | ||
605 | Core.ajax({ | 616 | Core.ajax({ |
606 | type:"post", | 617 | type:"post", |
607 | url:"/user/reset_passwd?pwd_code="+NewKey+"&password="+NewPsw, | 618 | url:"/user/reset_passwd?pwd_code="+NewKey+"&password="+NewPsw, | ... | ... |
... | @@ -650,7 +650,7 @@ | ... | @@ -650,7 +650,7 @@ |
650 | <i>{{? Core.Data.is_guest == 1}}正式账号:{{??}}旧密码:{{?}}</i> | 650 | <i>{{? Core.Data.is_guest == 1}}正式账号:{{??}}旧密码:{{?}}</i> |
651 | <label> | 651 | <label> |
652 | 652 | ||
653 | - <input {{? Core.Data.is_guest == 1}}type="text"{{??}}type="password"{{?}} class="old_pwd required " name="{{? Core.Data.is_guest >= 1}}username{{??}}password{{?}}" value="{{? Core.Data.new_pwd}}{{=Core.Data.new_pwd}}{{?}}" required="required" placeholder="{{? Core.Data.is_guest == 1}}请输入6-18位字母或数字{{??}}请输入旧密码{{?}}" required/> | 653 | + <input {{? Core.Data.is_guest == 1}}type="text"{{??}}type="password"{{?}} class="old_pwd required " name="{{? Core.Data.is_guest >= 1}}username{{??}}password{{?}}" value="{{? Core.Data.new_pwd}}{{=Core.Data.new_pwd}}{{?}}" required="required" placeholder="{{? Core.Data.is_guest == 1}}请输入3-18位字母或数字{{??}}请输入旧密码{{?}}" required/> |
654 | </label> | 654 | </label> |
655 | </div> | 655 | </div> |
656 | <div class="input new-sdk-psw clearfix"> | 656 | <div class="input new-sdk-psw clearfix"> | ... | ... |
No preview for this file type
... | @@ -551,7 +551,8 @@ function initMatching(){ | ... | @@ -551,7 +551,8 @@ function initMatching(){ |
551 | } | 551 | } |
552 | if ($obj[0].tagName == "FORM") { | 552 | if ($obj[0].tagName == "FORM") { |
553 | $obj[0].disabled = false; | 553 | $obj[0].disabled = false; |
554 | - $obj.find("input, button").attr('disabled', null); | 554 | + $obj.find("input[type='text'],input[type='password'],input[name='password'], button").attr('disabled', null); |
555 | + | ||
555 | var $but_input = $obj.find('[type=submit]'); | 556 | var $but_input = $obj.find('[type=submit]'); |
556 | if ($but_input.is('button')) { | 557 | if ($but_input.is('button')) { |
557 | $but_input.html(temp); | 558 | $but_input.html(temp); | ... | ... |
... | @@ -385,18 +385,28 @@ | ... | @@ -385,18 +385,28 @@ |
385 | 385 | ||
386 | 386 | ||
387 | that.$c.on('click', '[type=submit],.submit', function(e) { | 387 | that.$c.on('click', '[type=submit],.submit', function(e) { |
388 | + var passWordReg = /^[0-9a-zA-Z]+$/; | ||
388 | e.preventDefault(); | 389 | e.preventDefault(); |
389 | if(/[A-Z]/.test(that.$c.find("input[name='username']").val())){ | 390 | if(/[A-Z]/.test(that.$c.find("input[name='username']").val())){ |
390 | Core.showTips("账号不能有大写字母!"); | 391 | Core.showTips("账号不能有大写字母!"); |
391 | }else if(/[A-Z]/.test(that.$c.find("input[name='password']").val())){ | 392 | }else if(/[A-Z]/.test(that.$c.find("input[name='password']").val())){ |
392 | Core.showTips("密码不能有大写字母!"); | 393 | Core.showTips("密码不能有大写字母!"); |
394 | + }else if(that.$c.find("input[name='password']").val().length<6 || that.$c.find("input[name='password']").val().length>16){ | ||
395 | + Core.showTips("密码长度为6-16位字符!"); | ||
393 | }else if(!that.$c.find('.checkbox-2').length>0){ | 396 | }else if(!that.$c.find('.checkbox-2').length>0){ |
394 | Core.showTips('请同意'+Core.PLATFORM_NAME+'网络协议',1); | 397 | Core.showTips('请同意'+Core.PLATFORM_NAME+'网络协议',1); |
398 | + }else if(!passWordReg.test(that.$c.find("input[name='password']").val())){ | ||
399 | + Core.showTips('请输入数字字母组成的密码!', true); | ||
400 | + return false; | ||
395 | }else{ | 401 | }else{ |
396 | //如果是游客的话则调用安卓截屏方法 | 402 | //如果是游客的话则调用安卓截屏方法 |
397 | if (that.$c.find('[name="username"]').val() == that.$c.find('[name="old_usernmae"]').val() && window.android != undefined && window.android.screenShot != undefined ){ | 403 | if (that.$c.find('[name="username"]').val() == that.$c.find('[name="old_usernmae"]').val() && window.android != undefined && window.android.screenShot != undefined ){ |
398 | window.android.screenShot(); | 404 | window.android.screenShot(); |
399 | - } | 405 | + } |
406 | + $(this).attr("disabled",true); | ||
407 | + $(this).css({"background":"#999"}); | ||
408 | + $(this).parent("li").css({"background":"#999"}); | ||
409 | + | ||
400 | Core.ajax_do(that.$c.find('.ajax'), that.register_cb, that); | 410 | Core.ajax_do(that.$c.find('.ajax'), that.register_cb, that); |
401 | } | 411 | } |
402 | return false; | 412 | return false; |
... | @@ -419,6 +429,9 @@ | ... | @@ -419,6 +429,9 @@ |
419 | that.$c.find('[name="old_usernmae"]').val(random_name) | 429 | that.$c.find('[name="old_usernmae"]').val(random_name) |
420 | that.$c.find('[name="password"]').val(random_passwd) | 430 | that.$c.find('[name="password"]').val(random_passwd) |
421 | that.$c.find('[name="type"]').val(-1) | 431 | that.$c.find('[name="type"]').val(-1) |
432 | + that.$c.find("input#btn-regist").attr('disabled', null); | ||
433 | + that.$c.find('.submit').css({"background":"#00beef"}); | ||
434 | + that.$c.find('.submit').parent("li").css({"background":"#00beef"}); | ||
422 | 435 | ||
423 | } | 436 | } |
424 | Register.prototype.cache = Login.prototype.cache; | 437 | Register.prototype.cache = Login.prototype.cache; |
... | @@ -431,6 +444,10 @@ | ... | @@ -431,6 +444,10 @@ |
431 | this.cache(); | 444 | this.cache(); |
432 | Core.showTips('成功注册,欢迎使用' + Core.PLATFORM_NAME + '游戏平台'); | 445 | Core.showTips('成功注册,欢迎使用' + Core.PLATFORM_NAME + '游戏平台'); |
433 | Core.updateMod('home'); | 446 | Core.updateMod('home'); |
447 | + | ||
448 | + this.$c.find("input#btn-regist").attr('disabled', null); | ||
449 | + this.$c.find('.submit').css({"background":"#00beef"}); | ||
450 | + this.$c.find('.submit').parent("li").css({"background":"#00beef"}); | ||
434 | } | 451 | } |
435 | Register.prototype.show_after = function() { | 452 | Register.prototype.show_after = function() { |
436 | this.set_random(); | 453 | this.set_random(); |
... | @@ -588,9 +605,14 @@ | ... | @@ -588,9 +605,14 @@ |
588 | that.$c.on("click","#js_confirm_resetnewpsw",function(){ | 605 | that.$c.on("click","#js_confirm_resetnewpsw",function(){ |
589 | var NewPsw = that.$c.find("#js_reset_newpsw").val(), | 606 | var NewPsw = that.$c.find("#js_reset_newpsw").val(), |
590 | NewKey = that.$c.find("input[name='pwd_code']").val(), | 607 | NewKey = that.$c.find("input[name='pwd_code']").val(), |
608 | + passWordReg = /^[0-9a-zA-Z]+$/, | ||
591 | account = $("input[name='loginUserName']").val(); | 609 | account = $("input[name='loginUserName']").val(); |
592 | var names = localStorage.getItem('user_names'); | 610 | var names = localStorage.getItem('user_names'); |
593 | names = JSON.parse(names); | 611 | names = JSON.parse(names); |
612 | + if(!passWordReg.test(NewPsw)){ | ||
613 | + Core.showTips('请输入数字字母组成的密码!', true); | ||
614 | + return false; | ||
615 | + } | ||
594 | Core.ajax({ | 616 | Core.ajax({ |
595 | type:"post", | 617 | type:"post", |
596 | url:"/user/reset_passwd?pwd_code="+NewKey+"&password="+NewPsw, | 618 | url:"/user/reset_passwd?pwd_code="+NewKey+"&password="+NewPsw, | ... | ... |
... | @@ -158,7 +158,7 @@ | ... | @@ -158,7 +158,7 @@ |
158 | <input type="hidden" name="type" value="-1"> | 158 | <input type="hidden" name="type" value="-1"> |
159 | <ul class="inline-btn"> | 159 | <ul class="inline-btn"> |
160 | <li><a class="btn btn_pri_block btn-orange" href="#home">返回</a></li> | 160 | <li><a class="btn btn_pri_block btn-orange" href="#home">返回</a></li> |
161 | - <li><a class="submit btn larg " >确定注册</a></li> | 161 | + <li><input type="button" class="submit btn larg" id="btn-regist" value="确定注册"></li> |
162 | </ul> | 162 | </ul> |
163 | </form> | 163 | </form> |
164 | </div> | 164 | </div> |
... | @@ -650,7 +650,7 @@ | ... | @@ -650,7 +650,7 @@ |
650 | <i>{{? Core.Data.is_guest == 1}}正式账号:{{??}}旧密码:{{?}}</i> | 650 | <i>{{? Core.Data.is_guest == 1}}正式账号:{{??}}旧密码:{{?}}</i> |
651 | <label> | 651 | <label> |
652 | 652 | ||
653 | - <input {{? Core.Data.is_guest == 1}}type="text"{{??}}type="password"{{?}} class="old_pwd required " name="{{? Core.Data.is_guest >= 1}}username{{??}}password{{?}}" value="{{? Core.Data.new_pwd}}{{=Core.Data.new_pwd}}{{?}}" required="required" placeholder="{{? Core.Data.is_guest == 1}}请输入6-18位字母或数字{{??}}请输入旧密码{{?}}" required/> | 653 | + <input {{? Core.Data.is_guest == 1}}type="text"{{??}}type="password"{{?}} class="old_pwd required " name="{{? Core.Data.is_guest >= 1}}username{{??}}password{{?}}" value="{{? Core.Data.new_pwd}}{{=Core.Data.new_pwd}}{{?}}" required="required" placeholder="{{? Core.Data.is_guest == 1}}请输入3-18位字母或数字{{??}}请输入旧密码{{?}}" required/> |
654 | </label> | 654 | </label> |
655 | </div> | 655 | </div> |
656 | <div class="input new-sdk-psw clearfix"> | 656 | <div class="input new-sdk-psw clearfix"> | ... | ... |
... | @@ -122,7 +122,6 @@ body{ | ... | @@ -122,7 +122,6 @@ body{ |
122 | height:53px; | 122 | height:53px; |
123 | } | 123 | } |
124 | .new-sdk-container .new-sdk-logo img{ | 124 | .new-sdk-container .new-sdk-logo img{ |
125 | - display: none; | ||
126 | width: 210px; | 125 | width: 210px; |
127 | margin: 0 auto; | 126 | margin: 0 auto; |
128 | padding: 15px 0 0 0; | 127 | padding: 15px 0 0 0; | ... | ... |
-
Please register or login to post a comment