xuguohong

update sdk

......@@ -551,7 +551,7 @@ function initMatching(){
}
if ($obj[0].tagName == "FORM") {
$obj[0].disabled = false;
$obj.find("input[type='text'], button").attr('disabled', null);
$obj.find("input[type='text'],input[type='password'],input[name='password'], button").attr('disabled', null);
var $but_input = $obj.find('[type=submit]');
if ($but_input.is('button')) {
......
......@@ -385,13 +385,19 @@
that.$c.on('click', '[type=submit],.submit', function(e) {
var passWordReg = /^[0-9a-zA-Z]+$/;
e.preventDefault();
if(/[A-Z]/.test(that.$c.find("input[name='username']").val())){
Core.showTips("账号不能有大写字母!");
}else if(/[A-Z]/.test(that.$c.find("input[name='password']").val())){
Core.showTips("密码不能有大写字母!");
}else if(that.$c.find("input[name='password']").val().length<6 || that.$c.find("input[name='password']").val().length>16){
Core.showTips("密码长度为6-16位字符!");
}else if(!that.$c.find('.checkbox-2').length>0){
Core.showTips('请同意'+Core.PLATFORM_NAME+'网络协议',1);
}else if(!passWordReg.test(that.$c.find("input[name='password']").val())){
Core.showTips('请输入数字字母组成的密码!', true);
return false;
}else{
//如果是游客的话则调用安卓截屏方法
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 @@
that.$c.on("click","#js_confirm_resetnewpsw",function(){
var NewPsw = that.$c.find("#js_reset_newpsw").val(),
NewKey = that.$c.find("input[name='pwd_code']").val(),
passWordReg = /^[0-9a-zA-Z]+$/,
account = $("input[name='loginUserName']").val();
var names = localStorage.getItem('user_names');
names = JSON.parse(names);
if(!passWordReg.test(NewPsw)){
Core.showTips('请输入数字字母组成的密码!', true);
return false;
}
Core.ajax({
type:"post",
url:"/user/reset_passwd?pwd_code="+NewKey+"&password="+NewPsw,
......
......@@ -650,7 +650,7 @@
<i>{{? Core.Data.is_guest == 1}}正式账号:{{??}}旧密码:{{?}}</i>
<label>
<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/>
<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/>
</label>
</div>
<div class="input new-sdk-psw clearfix">
......
......@@ -551,7 +551,8 @@ function initMatching(){
}
if ($obj[0].tagName == "FORM") {
$obj[0].disabled = false;
$obj.find("input, button").attr('disabled', null);
$obj.find("input[type='text'],input[type='password'],input[name='password'], button").attr('disabled', null);
var $but_input = $obj.find('[type=submit]');
if ($but_input.is('button')) {
$but_input.html(temp);
......
......@@ -385,18 +385,28 @@
that.$c.on('click', '[type=submit],.submit', function(e) {
var passWordReg = /^[0-9a-zA-Z]+$/;
e.preventDefault();
if(/[A-Z]/.test(that.$c.find("input[name='username']").val())){
Core.showTips("账号不能有大写字母!");
}else if(/[A-Z]/.test(that.$c.find("input[name='password']").val())){
Core.showTips("密码不能有大写字母!");
}else if(that.$c.find("input[name='password']").val().length<6 || that.$c.find("input[name='password']").val().length>16){
Core.showTips("密码长度为6-16位字符!");
}else if(!that.$c.find('.checkbox-2').length>0){
Core.showTips('请同意'+Core.PLATFORM_NAME+'网络协议',1);
}else if(!passWordReg.test(that.$c.find("input[name='password']").val())){
Core.showTips('请输入数字字母组成的密码!', true);
return false;
}else{
//如果是游客的话则调用安卓截屏方法
if (that.$c.find('[name="username"]').val() == that.$c.find('[name="old_usernmae"]').val() && window.android != undefined && window.android.screenShot != undefined ){
window.android.screenShot();
}
}
$(this).attr("disabled",true);
$(this).css({"background":"#999"});
$(this).parent("li").css({"background":"#999"});
Core.ajax_do(that.$c.find('.ajax'), that.register_cb, that);
}
return false;
......@@ -419,6 +429,9 @@
that.$c.find('[name="old_usernmae"]').val(random_name)
that.$c.find('[name="password"]').val(random_passwd)
that.$c.find('[name="type"]').val(-1)
that.$c.find("input#btn-regist").attr('disabled', null);
that.$c.find('.submit').css({"background":"#00beef"});
that.$c.find('.submit').parent("li").css({"background":"#00beef"});
}
Register.prototype.cache = Login.prototype.cache;
......@@ -431,6 +444,10 @@
this.cache();
Core.showTips('成功注册,欢迎使用' + Core.PLATFORM_NAME + '游戏平台');
Core.updateMod('home');
this.$c.find("input#btn-regist").attr('disabled', null);
this.$c.find('.submit').css({"background":"#00beef"});
this.$c.find('.submit').parent("li").css({"background":"#00beef"});
}
Register.prototype.show_after = function() {
this.set_random();
......@@ -588,9 +605,14 @@
that.$c.on("click","#js_confirm_resetnewpsw",function(){
var NewPsw = that.$c.find("#js_reset_newpsw").val(),
NewKey = that.$c.find("input[name='pwd_code']").val(),
passWordReg = /^[0-9a-zA-Z]+$/,
account = $("input[name='loginUserName']").val();
var names = localStorage.getItem('user_names');
names = JSON.parse(names);
if(!passWordReg.test(NewPsw)){
Core.showTips('请输入数字字母组成的密码!', true);
return false;
}
Core.ajax({
type:"post",
url:"/user/reset_passwd?pwd_code="+NewKey+"&password="+NewPsw,
......
......@@ -158,7 +158,7 @@
<input type="hidden" name="type" value="-1">
<ul class="inline-btn">
<li><a class="btn btn_pri_block btn-orange" href="#home">返回</a></li>
<li><a class="submit btn larg " >确定注册</a></li>
<li><input type="button" class="submit btn larg" id="btn-regist" value="确定注册"></li>
</ul>
</form>
</div>
......@@ -650,7 +650,7 @@
<i>{{? Core.Data.is_guest == 1}}正式账号:{{??}}旧密码:{{?}}</i>
<label>
<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/>
<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/>
</label>
</div>
<div class="input new-sdk-psw clearfix">
......
......@@ -122,7 +122,6 @@ body{
height:53px;
}
.new-sdk-container .new-sdk-logo img{
display: none;
width: 210px;
margin: 0 auto;
padding: 15px 0 0 0;
......