Authored by xuqi

fix bug of getting mobile & areacode

@@ -9,8 +9,8 @@ module.exports = function(useInRegister) { @@ -9,8 +9,8 @@ module.exports = function(useInRegister) {
9 var $captcha = $('#captcha'), 9 var $captcha = $('#captcha'),
10 $btnNext = $('#btn-next'), 10 $btnNext = $('#btn-next'),
11 $captchaTip = $('#captcha-tip'), 11 $captchaTip = $('#captcha-tip'),
12 - mobile = $('#mobile').val(),  
13 - area = $('#area').val().split('+')[1]; 12 + phoneNum = $('#phone-num').val(),
  13 + areaCode = $('#area-code').val().split('+')[1];
14 14
15 var api = require('./api'); 15 var api = require('./api');
16 var tip = require('../plugin/tip'); 16 var tip = require('../plugin/tip');
@@ -54,8 +54,8 @@ module.exports = function(useInRegister) { @@ -54,8 +54,8 @@ module.exports = function(useInRegister) {
54 type: 'POST', 54 type: 'POST',
55 url: '/passport/' + urlMid + '/sendcode', 55 url: '/passport/' + urlMid + '/sendcode',
56 data: { 56 data: {
57 - phoneNum: mobile,  
58 - areaCode: area 57 + phoneNum: phoneNum,
  58 + areaCode: areaCode
59 }, 59 },
60 success: function(data) { 60 success: function(data) {
61 if (data.code === 200) { 61 if (data.code === 200) {
@@ -79,8 +79,8 @@ module.exports = function(useInRegister) { @@ -79,8 +79,8 @@ module.exports = function(useInRegister) {
79 type: 'POST', 79 type: 'POST',
80 url: '/passport/' + urlMid + '/verifycode', 80 url: '/passport/' + urlMid + '/verifycode',
81 data: { 81 data: {
82 - phoneNum: mobile,  
83 - areaCode: area, 82 + phoneNum: phoneNum,
  83 + areaCode: areaCode,
84 code: trim($captcha.val()), 84 code: trim($captcha.val()),
85 token: $('#token').val() 85 token: $('#token').val()
86 }, 86 },