Authored by 周少峰

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

@@ -56,8 +56,8 @@ class BindController extends AbstractAction @@ -56,8 +56,8 @@ class BindController extends AbstractAction
56 $nickname = $this->get('nickname'); 56 $nickname = $this->get('nickname');
57 $areaCode = $this->get('areaCode', '86'); 57 $areaCode = $this->get('areaCode', '86');
58 $isReg = $this->get('isReg'); 58 $isReg = $this->get('isReg');
59 - $mobile=$this->get('mobile');  
60 - 59 + $phoneNum=$this->get('phoneNum');
  60 +
61 $data = array( 61 $data = array(
62 'bindIndex'=>true,//js标识 62 'bindIndex'=>true,//js标识
63 'backUrl' => '/', // 返回的URL链接 63 'backUrl' => '/', // 返回的URL链接
@@ -68,7 +68,7 @@ class BindController extends AbstractAction @@ -68,7 +68,7 @@ class BindController extends AbstractAction
68 'nickname' => $nickname, //昵称 68 'nickname' => $nickname, //昵称
69 'isReg' => $isReg, //是否是已注册过的手机号 69 'isReg' => $isReg, //是否是已注册过的手机号
70 'areaCode' => $areaCode, //国别码 70 'areaCode' => $areaCode, //国别码
71 - 'phoneNum'=>$mobile,//手机号码 71 + 'phoneNum'=>$phoneNum,//手机号码
72 ); 72 );
73 73
74 // 渲染模板 74 // 渲染模板
@@ -114,31 +114,31 @@ class BindController extends AbstractAction @@ -114,31 +114,31 @@ class BindController extends AbstractAction
114 break; 114 break;
115 } 115 }
116 116
117 - $mobile = $this->post('mobile'); 117 + $phoneNum = $this->post('phoneNum');
118 $openId = $this->post('openId'); 118 $openId = $this->post('openId');
119 $areaCode = $this->post('areaCode', '86'); 119 $areaCode = $this->post('areaCode', '86');
120 $sourceType = $this->post('sourceType'); 120 $sourceType = $this->post('sourceType');
121 $nickname = $this->post('nickname'); 121 $nickname = $this->post('nickname');
122 122
123 123
124 - if (!is_numeric($mobile) || !$openId || !$areaCode || !$sourceType) 124 + if (!is_numeric($phoneNum) || !$openId || !$areaCode || !$sourceType)
125 { 125 {
126 break; 126 break;
127 } 127 }
128 128
129 - $res = BindData::bindCheck($mobile, $openId, $sourceType); 129 + $res = BindData::bindCheck($phoneNum, $openId, $sourceType);
130 if (!isset($res['code'])) 130 if (!isset($res['code']))
131 { 131 {
132 break; 132 break;
133 } 133 }
134 if ($res['code'] == 200) 134 if ($res['code'] == 200)
135 { 135 {
136 - $next = Helpers::url('/passport/bind/code', array('isReg' => $res['data']['is_register'], 'openId' => $openId, 'sourceType' => $sourceType, 'nickname' => $nickname, 'areaCode' => $areaCode, 'mobile' => $mobile)); 136 + $next = Helpers::url('/passport/bind/code', array('isReg' => $res['data']['is_register'], 'openId' => $openId, 'sourceType' => $sourceType, 'nickname' => $nickname, 'areaCode' => $areaCode, 'phoneNum' => $phoneNum));
137 $data = array('code' => $res['code'], 'message' => $res['message'], 'data' => array('isReg' => $res['data']['is_register'], 'next' => $next)); 137 $data = array('code' => $res['code'], 'message' => $res['message'], 'data' => array('isReg' => $res['data']['is_register'], 'next' => $next));
138 } 138 }
139 else 139 else
140 { 140 {
141 - $data = array('code' => 500, 'message' => $res['message'], 'data' => $res['data']); 141 + $data = array('code' => $res['code'], 'message' => $res['message'], 'data' => $res['data']);
142 } 142 }
143 } 143 }
144 while (false); 144 while (false);
@@ -159,15 +159,15 @@ class BindController extends AbstractAction @@ -159,15 +159,15 @@ class BindController extends AbstractAction
159 break; 159 break;
160 } 160 }
161 161
162 - $mobile = $this->post('mobile'); 162 + $phoneNum = $this->post('phoneNum');
163 $areaCode = $this->post('areaCode'); 163 $areaCode = $this->post('areaCode');
164 164
165 - if (!is_numeric($mobile)) 165 + if (!is_numeric($phoneNum))
166 { 166 {
167 break; 167 break;
168 } 168 }
169 169
170 - $data = BindData::sendBindMsg($areaCode,$mobile); 170 + $data = BindData::sendBindMsg($areaCode,$phoneNum);
171 if (!isset($data['code'])) 171 if (!isset($data['code']))
172 { 172 {
173 break; 173 break;
@@ -191,16 +191,16 @@ class BindController extends AbstractAction @@ -191,16 +191,16 @@ class BindController extends AbstractAction
191 break; 191 break;
192 } 192 }
193 193
194 - $mobile = $this->post('mobile'); 194 + $phoneNum = $this->post('phoneNum');
195 $msgCode = $this->post('msgCode'); 195 $msgCode = $this->post('msgCode');
196 $areaCode = $this->post('areaCode'); 196 $areaCode = $this->post('areaCode');
197 197
198 - if (!is_numeric($mobile) || !$msgCode) 198 + if (!is_numeric($phoneNum) || !$msgCode)
199 { 199 {
200 break; 200 break;
201 } 201 }
202 202
203 - $data = BindData::checkBindCode($areaCode,$mobile, $msgCode); 203 + $data = BindData::checkBindCode($areaCode,$phoneNum, $msgCode);
204 if (!isset($data['code'])) 204 if (!isset($data['code']))
205 { 205 {
206 break; 206 break;
@@ -224,19 +224,19 @@ class BindController extends AbstractAction @@ -224,19 +224,19 @@ class BindController extends AbstractAction
224 break; 224 break;
225 } 225 }
226 226
227 - $mobile = $this->post('mobile'); 227 + $phoneNum = $this->post('phoneNum');
228 $openId = $this->post('openId'); 228 $openId = $this->post('openId');
229 $areaCode = $this->post('areaCode', '86'); 229 $areaCode = $this->post('areaCode', '86');
230 $sourceType = $this->post('sourceType'); 230 $sourceType = $this->post('sourceType');
231 $nickname = $this->post('nickname'); 231 $nickname = $this->post('nickname');
232 $password = $this->post('password'); 232 $password = $this->post('password');
233 233
234 - if (!is_numeric($mobile) || !$openId || !$sourceType || !$areaCode) 234 + if (!is_numeric($phoneNum) || !$openId || !$sourceType || !$areaCode)
235 { 235 {
236 break; 236 break;
237 } 237 }
238 238
239 - $res = BindData::bindMobile($openId, $nickname, $sourceType, $mobile, $areaCode, $password); 239 + $res = BindData::bindMobile($openId, $nickname, $sourceType, $phoneNum, $areaCode, $password);
240 if (!isset($res['code'])) 240 if (!isset($res['code']))
241 { 241 {
242 break; 242 break;