...
|
...
|
@@ -190,13 +190,9 @@ const bind = { |
|
|
let from = req.cookies.from || 'yohobuy';
|
|
|
|
|
|
if (_.isNumber(parseInt(phoneNum, 0)) && openId && sourceType && nickname && areaCode && code) {
|
|
|
req.ctx(BindServiceModel).checkBindCode(areaCode, phoneNum, code).then(result => {
|
|
|
if (result && result.code && result.code === 200) {
|
|
|
return req.ctx(BindServiceModel).bindMobile(openId, sourceType,
|
|
|
phoneNum, areaCode, password, from, nickname);
|
|
|
} else {
|
|
|
return { code: 400, message: '短信验证码错误', data: '' };
|
|
|
}
|
|
|
req.ctx(BindServiceModel).bindMobile({
|
|
|
openId, sourceType, phoneNum,
|
|
|
areaCode, password, from, nickname, code
|
|
|
}).then(result => {
|
|
|
let refer = helpers.urlFormat('/passport/bind/success?type=bind');
|
|
|
|
...
|
...
|
|