Authored by 毕凯

完善注册

@@ -18,7 +18,8 @@ var nickname = $('#nickname').val(), @@ -18,7 +18,8 @@ var nickname = $('#nickname').val(),
18 sourceType = $('#sourceType').val(), 18 sourceType = $('#sourceType').val(),
19 openId = $('#openId').val(), 19 openId = $('#openId').val(),
20 phoneNum = $('#phone-num').val(), 20 phoneNum = $('#phone-num').val(),
21 - areaCode = $('#area-code').val().replace('+', ''); 21 + areaCode = $('#area-code').val().replace('+', ''),
  22 + code = $('#code').val();
22 23
23 function startBind(password) { 24 function startBind(password) {
24 $.ajax({ 25 $.ajax({
@@ -30,7 +31,8 @@ function startBind(password) { @@ -30,7 +31,8 @@ function startBind(password) {
30 openId: openId, 31 openId: openId,
31 sourceType: sourceType, 32 sourceType: sourceType,
32 nickname: nickname, 33 nickname: nickname,
33 - password: password 34 + password: password,
  35 + code: code
34 }, 36 },
35 success: function(res) { 37 success: function(res) {
36 if (res.code === 200) { 38 if (res.code === 200) {
@@ -138,7 +138,7 @@ module.exports = function(useInRegister, useForBind, useForRelate) { @@ -138,7 +138,7 @@ module.exports = function(useInRegister, useForBind, useForRelate) {
138 } else { 138 } else {
139 location.href = '/passport/bind/password?phoneNum=' + 139 location.href = '/passport/bind/password?phoneNum=' +
140 phoneNum + '&areaCode=' + areaCode + '&openId=' + 140 phoneNum + '&areaCode=' + areaCode + '&openId=' +
141 - openId + '&sourceType=' + sourceType + '&nickname=' + nickname; 141 + openId + '&sourceType=' + sourceType + '&nickname=' + nickname + '&code=' + trim($captcha.val());
142 } 142 }
143 143
144 } else { 144 } else {
@@ -13,5 +13,6 @@ @@ -13,5 +13,6 @@
13 <input id="phone-num" type="hidden" value={{phoneNum}}> 13 <input id="phone-num" type="hidden" value={{phoneNum}}>
14 <input id="area-code" type="hidden" value={{areaCode}}> 14 <input id="area-code" type="hidden" value={{areaCode}}>
15 <input id="token" type="hidden" value={{token}}> 15 <input id="token" type="hidden" value={{token}}>
  16 + <input id="code" type="hidden" value={{code}}>
16 </div> 17 </div>
17 {{> layout/footer_passport}} 18 {{> layout/footer_passport}}
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <div class="text-container"> 3 <div class="text-container">
4 验证码已发送至 4 验证码已发送至
5 <span class="phone"> 5 <span class="phone">
6 - {{areaCode}} {{phoneNum}} 6 + +{{areaCode}} {{phoneNum}}
7 </span> 7 </span>
8 </div> 8 </div>
9 <div class="input-container row has-clear"> 9 <div class="input-container row has-clear">
@@ -56,7 +56,7 @@ class BindController extends AbstractAction @@ -56,7 +56,7 @@ class BindController extends AbstractAction
56 $areaCode = $this->get('areaCode', '86'); 56 $areaCode = $this->get('areaCode', '86');
57 $isReg = $this->get('isReg'); 57 $isReg = $this->get('isReg');
58 $phoneNum = $this->get('phoneNum'); 58 $phoneNum = $this->get('phoneNum');
59 - 59 +
60 $data = array( 60 $data = array(
61 'backUrl' => Helpers::url('/signin.html'), // 返回的URL链接 61 'backUrl' => Helpers::url('/signin.html'), // 返回的URL链接
62 'showHeaderImg' => true, // 控制显示头部图片 62 'showHeaderImg' => true, // 控制显示头部图片
@@ -68,7 +68,7 @@ class BindController extends AbstractAction @@ -68,7 +68,7 @@ class BindController extends AbstractAction
68 'areaCode' => $areaCode, //国别码 68 'areaCode' => $areaCode, //国别码
69 'phoneNum' => $phoneNum, //手机号码 69 'phoneNum' => $phoneNum, //手机号码
70 ); 70 );
71 - 71 +
72 $data['relateCode'] = ($isReg == 3) ? true : false;//关联js 72 $data['relateCode'] = ($isReg == 3) ? true : false;//关联js
73 $data['bindCode'] = ($isReg == 3) ? false : true;//绑定js 73 $data['bindCode'] = ($isReg == 3) ? false : true;//绑定js
74 74
@@ -87,6 +87,7 @@ class BindController extends AbstractAction @@ -87,6 +87,7 @@ class BindController extends AbstractAction
87 // $nickname = $this->get('nickname'); 87 // $nickname = $this->get('nickname');
88 $areaCode = $this->get('areaCode', '86'); 88 $areaCode = $this->get('areaCode', '86');
89 $phoneNum = $this->get('phoneNum'); 89 $phoneNum = $this->get('phoneNum');
  90 + $code = $this->get('code');
90 $data = array( 91 $data = array(
91 'bindPwd' => true, //js标识 92 'bindPwd' => true, //js标识
92 'backUrl' => Helpers::url('/signin.html'), // 返回的URL链接 93 'backUrl' => Helpers::url('/signin.html'), // 返回的URL链接
@@ -96,7 +97,8 @@ class BindController extends AbstractAction @@ -96,7 +97,8 @@ class BindController extends AbstractAction
96 'openId' => $openId, // openId 97 'openId' => $openId, // openId
97 // 'nickname' => $nickname, //昵称 98 // 'nickname' => $nickname, //昵称
98 'areaCode' => $areaCode, //国别码 99 'areaCode' => $areaCode, //国别码
99 - 'phoneNum' => $phoneNum //国别码 100 + 'phoneNum' => $phoneNum, //国别码
  101 + 'code' => $code // 验证码
100 ); 102 );
101 103
102 // 渲染模板 104 // 渲染模板