...
|
...
|
@@ -19,12 +19,17 @@ var $wrapper = $('.bindwrapper'), |
|
|
$nextBtn = $wrapper.find('.yohobindbtn');
|
|
|
|
|
|
var captcha = new Captcha('#captcha').init();
|
|
|
var captcha2;
|
|
|
var captcha2 = new Captcha('#captcha2');
|
|
|
|
|
|
var Alert = require('../../common/dialog').Alert;
|
|
|
|
|
|
require('../../simple-header');
|
|
|
|
|
|
function showCaptchaImg() {
|
|
|
captcha.show();
|
|
|
captcha2.show();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 选择协议
|
|
|
* @return {[type]} [description]
|
...
|
...
|
@@ -236,7 +241,6 @@ function sendMessageValidate() { |
|
|
if ($('#sendmessage').attr('disabled') === 'disabled') {
|
|
|
return;
|
|
|
}
|
|
|
captcha2.hideTip();
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
...
|
...
|
@@ -247,10 +251,7 @@ function sendMessageValidate() { |
|
|
verifyCode: captcha2.getResults()
|
|
|
}
|
|
|
}).then(function(data) {
|
|
|
if (data.code === 405) {
|
|
|
// 验证码 error
|
|
|
captcha2.showTip(data.message);
|
|
|
} else if (data.code !== 200) {
|
|
|
if (data.code !== 200) {
|
|
|
alert(data.message); // eslint-disable-line
|
|
|
} else {
|
|
|
circleTime($('#mobile').val());
|
...
|
...
|
@@ -324,7 +325,6 @@ function nextStep() { |
|
|
var regx;
|
|
|
|
|
|
e.preventDefault();
|
|
|
captcha.hideTip();
|
|
|
mobile = $('.phonenum').val();
|
|
|
areaCode = $('#areanum').text();
|
|
|
regx = phoneRegx['+' + areaCode];
|
...
|
...
|
@@ -354,11 +354,15 @@ function nextStep() { |
|
|
success: function(data) {
|
|
|
var winHeight = $(window).height();
|
|
|
|
|
|
if (data.code !== 200 && data.data && data.data.needCaptcha) {
|
|
|
showCaptchaImg();
|
|
|
}
|
|
|
|
|
|
if (data.code === 200) {
|
|
|
$('#bindmobileform').attr('action', data.data.next);
|
|
|
$('#bindmobileform').submit();
|
|
|
} else if (data.code === 201) {
|
|
|
captcha2 = new Captcha('#captcha2').init();
|
|
|
captcha2.init();
|
|
|
|
|
|
// 已注册 未绑定
|
|
|
username = data.data.user.username;
|
...
|
...
|
@@ -405,9 +409,6 @@ function nextStep() { |
|
|
} else if (data.code === 402) {
|
|
|
$phoneTip.find('em').text('手机格式错误');
|
|
|
$phoneTip.removeClass('hide');
|
|
|
} else if (data.code === 405) {
|
|
|
// 验证码 error
|
|
|
captcha.showTip(data.message);
|
|
|
} else {
|
|
|
if (data && data.message) {
|
|
|
alert(data.message); // eslint-disable-line
|
...
|
...
|
|