...
|
...
|
@@ -4,6 +4,9 @@ |
|
|
* @date: 2016/1/27
|
|
|
*/
|
|
|
var $ = require('yoho-jquery');
|
|
|
|
|
|
var Captcha = require('../../plugins/captcha');
|
|
|
var captcha = new Captcha('#captcha').init();
|
|
|
var dovalidate = false; // 校验验证码的标识
|
|
|
var isvalidatecode = false; // 是否验证成功的标识
|
|
|
var isvalidatepwd = false; // 密码验证是否通过的标识
|
...
|
...
|
@@ -117,27 +120,31 @@ function sendMessageValidate() { |
|
|
var area = '';
|
|
|
|
|
|
$(document).on('click', '#sendmessage', function() {
|
|
|
circleTime();
|
|
|
captcha.hideTip();
|
|
|
mobile = $('#mobile').val();
|
|
|
area = $('#area').val();
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/passport/autouserinfo/sendBindMsg',
|
|
|
url: '/passport/autouserinfo/sendBindMsgCode',
|
|
|
data: {
|
|
|
mobile: mobile,
|
|
|
area: area
|
|
|
area: area,
|
|
|
verifyCode: captcha.getResults()
|
|
|
}
|
|
|
}).then(function(data) {
|
|
|
if (data.code !== 200) {
|
|
|
alert(data.message); // eslint-disable-line
|
|
|
if (data.code === 200) {
|
|
|
circleTime();
|
|
|
return true;
|
|
|
} else if (data.code === 405) {
|
|
|
captcha.showTip(data.message);
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
alert(data.message); // eslint-disable-line
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function codeValidate() {
|
|
|
var validatenum = '';
|
|
|
|
...
|
...
|
@@ -298,8 +305,6 @@ function actionConfirm() { |
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function init() {
|
|
|
$pwd = $('#pwd');
|
|
|
$pwdParent = $('.safelevel');
|
...
|
...
|
@@ -309,9 +314,6 @@ function init() { |
|
|
codeValidate();
|
|
|
validatePwd();
|
|
|
actionConfirm();
|
|
|
|
|
|
$('#sendmessage').click();
|
|
|
circleTime(); // 倒计时
|
|
|
}
|
|
|
|
|
|
init(); |
...
|
...
|
|