...
|
...
|
@@ -216,11 +216,12 @@ const bind = { |
|
|
let sourceType = req.body.sourceType;
|
|
|
let code = req.body.code;
|
|
|
let password = req.body.password || '';
|
|
|
let from = req.cookies.from || 'yohobuy';
|
|
|
|
|
|
if (_.isNumber(parseInt(phoneNum, 0)) && openId && sourceType && areaCode && code) {
|
|
|
BindService.checkBindCode(areaCode, phoneNum, code).then(result => {
|
|
|
if (result && result.code && result.code === 200) {
|
|
|
return BindService.bindMobile(openId, sourceType, phoneNum, areaCode, password);
|
|
|
return BindService.bindMobile(openId, sourceType, phoneNum, areaCode, password, from);
|
|
|
} else {
|
|
|
return { code: 400, message: '短信验证码错误', data: '' };
|
|
|
}
|
...
|
...
|
|