Merge branch 'dev_zcl' into dev

master
zhengchanglong 5 years ago
commit f5b21850f8

@ -229,9 +229,11 @@ var PhoneObj = {
countDown:function(dom){
PhoneObj.codeflag = false;
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) {
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.i = 60;
return;
@ -244,6 +246,8 @@ var PhoneObj = {
sendPhoneCode:function(phone,fun){
if(PhoneObj.codeflag){
if(PhoneObj.checkPhone(phone)){
//无需等待网络响应直接倒计时
fun()
//获取验证码
$.ajax({
type: 'GET',
@ -252,14 +256,15 @@ var PhoneObj = {
success: function (result) {
if (result.status != 1) {
alert(result.msg);
} else {
fun()
}
// else {
// fun()
// }
}
})
}
}else{
alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
// alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
}
}

Loading…
Cancel
Save