...
|
...
|
@@ -3837,7 +3837,8 @@ define("js/passport/entry", ["jquery","jquery.placeholder"], function(require, e |
|
|
require("js/passport/reg");
|
|
|
require("js/passport/back");
|
|
|
require("js/passport/login");
|
|
|
require("js/passport/reset");
|
|
|
require("js/passport/reset");
|
|
|
require("js/passport/vertification");
|
|
|
});
|
|
|
define("js/passport/reg", ["jquery"], function(require, exports, module){
|
|
|
/*
|
...
|
...
|
@@ -5345,3 +5346,106 @@ $('#pwd, #repwd').keydown(function(e) { |
|
|
});
|
|
|
|
|
|
});
|
|
|
define("js/passport/vertification", ["jquery"], function(require, exports, module){
|
|
|
/**
|
|
|
* 验证手机
|
|
|
* @author: xuqi<qi.xu@yoho.cn>
|
|
|
* @date: 2015/12/14
|
|
|
*/
|
|
|
|
|
|
var $ = require("jquery");
|
|
|
|
|
|
var $sc = $('#send-captcha'),
|
|
|
$msgTip = $('#captcha-tip'),
|
|
|
$errTip = $('#err-tip'),
|
|
|
$next = $('#next-step'),
|
|
|
seconds,
|
|
|
itime;
|
|
|
|
|
|
$sc.click(function() {
|
|
|
$.post('/passport/register/authcode', {
|
|
|
mobile: $('#mobile').val(),
|
|
|
area: $('#area').val(),
|
|
|
captcha: $('#captchaPic').val(),
|
|
|
project: 'repassword'
|
|
|
}, function(jsonData) {
|
|
|
if (jsonData.code === 200) {
|
|
|
$errTip.hide();
|
|
|
if ($(this).hasClass('disable')) {
|
|
|
return;
|
|
|
}
|
|
|
seconds = 60;
|
|
|
|
|
|
//$sc.addClass('disable').prop('disabled', true);
|
|
|
$sc.addClass('disable').attr('disabled', true);
|
|
|
$msgTip.removeClass('hide');
|
|
|
|
|
|
$sc.val(seconds-- + '秒后可重新操作');
|
|
|
itime = setInterval(function() {
|
|
|
if (seconds === 0) {
|
|
|
clearInterval(itime);
|
|
|
|
|
|
//$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
|
|
|
$sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
|
|
|
} else {
|
|
|
$sc.val(seconds-- + '秒后可重新操作');
|
|
|
}
|
|
|
}, 1000);
|
|
|
} else {
|
|
|
$(this).addClass('error');
|
|
|
$errTip.removeClass('hide').text('发送失败');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
if ($(this).hasClass('disable')) {
|
|
|
return;
|
|
|
}
|
|
|
seconds = 60;
|
|
|
|
|
|
//$sc.addClass('disable').prop('disabled', true);
|
|
|
$sc.addClass('disable').attr('disabled', true);
|
|
|
$msgTip.removeClass('hide');
|
|
|
|
|
|
$sc.val(seconds-- + '秒后可重新操作');
|
|
|
itime = setInterval(function() {
|
|
|
if (seconds === 0) {
|
|
|
clearInterval(itime);
|
|
|
|
|
|
//$sc.val('发送验证码').removeClass('disable').prop('disabled', false);
|
|
|
$sc.val('发送验证码').removeClass('disable').removeAttr('disabled');
|
|
|
} else {
|
|
|
$sc.val(seconds-- + '秒后可重新操作');
|
|
|
}
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
|
$('#captcha').keyup(function() {
|
|
|
var v = $.trim($(this).val());
|
|
|
|
|
|
if (v !== '') {
|
|
|
|
|
|
//添加验证码正确验证
|
|
|
//$next.removeClass('disable').prop('disabled', false);
|
|
|
$next.removeClass('disable').removeAttr('disabled');
|
|
|
} else {
|
|
|
|
|
|
//$next.addClass('disable').prop('disabled', true);
|
|
|
$next.addClass('disable').attr('disabled', true);
|
|
|
}
|
|
|
}).blur(function() {
|
|
|
var v = $.trim($(this).val());
|
|
|
|
|
|
if (v === '') {
|
|
|
|
|
|
//添加验证码正确验证
|
|
|
$(this).addClass('error');
|
|
|
$errTip.removeClass('hide');
|
|
|
} else {
|
|
|
$(this).removeClass('error');
|
|
|
$errTip.addClass('hide');
|
|
|
}
|
|
|
}).focus(function() {
|
|
|
$(this).removeClass('error');
|
|
|
});
|
|
|
}); |
...
|
...
|
|