|
@@ -97,8 +97,8 @@ function phoneAjaxFn(callback) { |
|
@@ -97,8 +97,8 @@ function phoneAjaxFn(callback) { |
97
|
validateResult[0].message = '';
|
97
|
validateResult[0].message = '';
|
98
|
validateResult[0].status = true;
|
98
|
validateResult[0].status = true;
|
99
|
break;
|
99
|
break;
|
100
|
- case 404:
|
|
|
101
|
- validateResult[0].message = '改账号已经存在';
|
100
|
+ case 400:
|
|
|
101
|
+ validateResult[0].message = data.message;
|
102
|
validateResult[0].status = false;
|
102
|
validateResult[0].status = false;
|
103
|
break;
|
103
|
break;
|
104
|
}
|
104
|
}
|
|
@@ -464,7 +464,48 @@ $registerBtn.click(function() { |
|
@@ -464,7 +464,48 @@ $registerBtn.click(function() { |
464
|
if ($(this).hasClass('disable')) {
|
464
|
if ($(this).hasClass('disable')) {
|
465
|
return;
|
465
|
return;
|
466
|
} else {
|
466
|
} else {
|
467
|
- ('#register-form').submit();
|
467
|
+
|
|
|
468
|
+ //ajax提交
|
|
|
469
|
+ $.ajax({
|
|
|
470
|
+ type: 'POST',
|
|
|
471
|
+ url: '/passport/register/mobileregister',
|
|
|
472
|
+ data: {
|
|
|
473
|
+ area: $region.text().split('+')[1],
|
|
|
474
|
+ mobile: $pn.val(),
|
|
|
475
|
+ captcha: $ca.val(),
|
|
|
476
|
+ code: $mc.val(),
|
|
|
477
|
+ password: $pwd.val()
|
|
|
478
|
+ }
|
|
|
479
|
+ }).then(function(data) {
|
|
|
480
|
+
|
|
|
481
|
+ var time = 0,
|
|
|
482
|
+ t,
|
|
|
483
|
+ refer = data.href;
|
|
|
484
|
+
|
|
|
485
|
+ t = setTimeout(function() {
|
|
|
486
|
+ time++;
|
|
|
487
|
+ }, 1000);
|
|
|
488
|
+
|
|
|
489
|
+ $.ajax({
|
|
|
490
|
+ type: 'POST',
|
|
|
491
|
+ url: '/passport/register/mobileregister',
|
|
|
492
|
+ data: {
|
|
|
493
|
+ session: data.session
|
|
|
494
|
+ }
|
|
|
495
|
+ }).then(function(data) {
|
|
|
496
|
+
|
|
|
497
|
+ if (data.code === 200 && t < 3) {
|
|
|
498
|
+ clearInterval(t);
|
|
|
499
|
+ location.href = refer;
|
|
|
500
|
+ }
|
|
|
501
|
+ });
|
|
|
502
|
+
|
|
|
503
|
+ if (t >= 3) {
|
|
|
504
|
+ clearInterval(t);
|
|
|
505
|
+ location.href = refer;
|
|
|
506
|
+ }
|
|
|
507
|
+
|
|
|
508
|
+ });
|
468
|
}
|
509
|
}
|
469
|
});
|
510
|
});
|
470
|
|
511
|
|