|
|
@ -229,9 +229,11 @@ var PhoneObj = {
|
|
|
|
countDown:function(dom){
|
|
|
|
countDown:function(dom){
|
|
|
|
PhoneObj.codeflag = false;
|
|
|
|
PhoneObj.codeflag = false;
|
|
|
|
PhoneObj.i = PhoneObj.i - 1;
|
|
|
|
PhoneObj.i = PhoneObj.i - 1;
|
|
|
|
dom.html(PhoneObj.i+"秒后重发").css("backgroundColor","#f5f5f5").css("color","#A9A9A9");
|
|
|
|
$("#getPhoneCode").html(PhoneObj.i+"秒后重发").css("backgroundColor","#f5f5f5").css("color","#A9A9A9");
|
|
|
|
|
|
|
|
$("#forgetGetPhoneCode").html(PhoneObj.i+"秒后重发").css("backgroundColor","#f5f5f5").css("color","#A9A9A9");
|
|
|
|
if (PhoneObj.i == 0) {
|
|
|
|
if (PhoneObj.i == 0) {
|
|
|
|
dom.html("重新发送").css("backgroundColor","#21B1EB").css("color","#fff");
|
|
|
|
$("#getPhoneCode").html("重新发送").css("backgroundColor","#21B1EB").css("color","#fff");
|
|
|
|
|
|
|
|
$("#forgetGetPhoneCode").html("重新发送").css("backgroundColor","#21B1EB").css("color","#fff");
|
|
|
|
PhoneObj.codeflag = true;
|
|
|
|
PhoneObj.codeflag = true;
|
|
|
|
PhoneObj.i = 60;
|
|
|
|
PhoneObj.i = 60;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -244,6 +246,8 @@ var PhoneObj = {
|
|
|
|
sendPhoneCode:function(phone,fun){
|
|
|
|
sendPhoneCode:function(phone,fun){
|
|
|
|
if(PhoneObj.codeflag){
|
|
|
|
if(PhoneObj.codeflag){
|
|
|
|
if(PhoneObj.checkPhone(phone)){
|
|
|
|
if(PhoneObj.checkPhone(phone)){
|
|
|
|
|
|
|
|
//无需等待网络响应直接倒计时
|
|
|
|
|
|
|
|
fun()
|
|
|
|
//获取验证码
|
|
|
|
//获取验证码
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
type: 'GET',
|
|
|
@ -252,14 +256,15 @@ var PhoneObj = {
|
|
|
|
success: function (result) {
|
|
|
|
success: function (result) {
|
|
|
|
if (result.status != 1) {
|
|
|
|
if (result.status != 1) {
|
|
|
|
alert(result.msg);
|
|
|
|
alert(result.msg);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
fun()
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// else {
|
|
|
|
|
|
|
|
// fun()
|
|
|
|
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
|
|
|
|
// alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|