Showing
3 changed files
with
27 additions
and
20 deletions
@@ -4043,9 +4043,10 @@ function picCaptchaAjaxFn(page, callback) { | @@ -4043,9 +4043,10 @@ function picCaptchaAjaxFn(page, callback) { | ||
4043 | type: 'POST', | 4043 | type: 'POST', |
4044 | url: url, | 4044 | url: url, |
4045 | data: { | 4045 | data: { |
4046 | - code: $ca.val(), | ||
4047 | - mobile: $pn.val(), | ||
4048 | - area: $region.text().split('+')[1] | 4046 | + code: $ca.val() |
4047 | + | ||
4048 | + //mobile: $pn.val(), | ||
4049 | + //area: $region.text().split('+')[1] | ||
4049 | } | 4050 | } |
4050 | }).then(function(data) { | 4051 | }).then(function(data) { |
4051 | switch (data.code) { | 4052 | switch (data.code) { |
@@ -4437,7 +4438,7 @@ exports.init = function(page) { | @@ -4437,7 +4438,7 @@ exports.init = function(page) { | ||
4437 | data: { | 4438 | data: { |
4438 | area: $region.text().split('+')[1], | 4439 | area: $region.text().split('+')[1], |
4439 | mobile: $pn.val(), | 4440 | mobile: $pn.val(), |
4440 | - captcha: $ca.val(), | 4441 | + verifyCode: $ca.val(), |
4441 | code: $mc.val(), | 4442 | code: $mc.val(), |
4442 | password: $pwd.val() | 4443 | password: $pwd.val() |
4443 | } | 4444 | } |
@@ -4445,29 +4446,35 @@ exports.init = function(page) { | @@ -4445,29 +4446,35 @@ exports.init = function(page) { | ||
4445 | 4446 | ||
4446 | var time = 0, | 4447 | var time = 0, |
4447 | t, | 4448 | t, |
4448 | - refer = data.href; | 4449 | + refer; |
4449 | 4450 | ||
4450 | - t = setTimeout(function() { | ||
4451 | - time++; | ||
4452 | - }, 1000); | 4451 | + if (data.code === 200) { |
4453 | 4452 | ||
4454 | - $.ajax({ | ||
4455 | - type: 'POST', | ||
4456 | - url: '/passport/register/mobileregister', | ||
4457 | - data: { | ||
4458 | - session: data.session | ||
4459 | - } | ||
4460 | - }).then(function(data) { | 4453 | + refer = data.data.href; |
4454 | + | ||
4455 | + t = setTimeout(function() { | ||
4456 | + time++; | ||
4457 | + }, 1000); | ||
4461 | 4458 | ||
4462 | - if (data.code === 200 && t < 3) { | 4459 | + $.ajax({ |
4460 | + type: 'GET', | ||
4461 | + url: data.data.session | ||
4462 | + }).then(function(data) { | ||
4463 | + | ||
4464 | + if (data.code === 200 && t < 3) { | ||
4465 | + clearInterval(t); | ||
4466 | + location.href = refer; | ||
4467 | + } | ||
4468 | + }); | ||
4469 | + | ||
4470 | + if (t >= 3) { | ||
4463 | clearInterval(t); | 4471 | clearInterval(t); |
4464 | location.href = refer; | 4472 | location.href = refer; |
4465 | } | 4473 | } |
4466 | - }); | 4474 | + } else { |
4467 | 4475 | ||
4468 | - if (t >= 3) { | ||
4469 | - clearInterval(t); | ||
4470 | - location.href = refer; | 4476 | + //todo |
4477 | + console.log('网络超时~'); | ||
4471 | } | 4478 | } |
4472 | 4479 | ||
4473 | }); | 4480 | }); |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
-
Please register or login to post a comment