...
|
...
|
@@ -158,7 +158,6 @@ let verifyMobile = (req, res, next) => { |
|
|
inviteCode: inviteCode
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return res.json(result);
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
@@ -171,7 +170,7 @@ let codeAction = (req, res, next) => { |
|
|
let token = req.query.token;
|
|
|
let mobile = +req.query.phoneNum;
|
|
|
let area = +(req.query.areaCode || 86);
|
|
|
let inviteCode = +req.query.inviteCode || '';
|
|
|
let inviteCode = req.query.inviteCode || '';
|
|
|
|
|
|
// 判断是否允许访问, 不允许则跳转到错误页面
|
|
|
if (!_.isString(token) || !_.isNumber(mobile) || !sign.verifyToken(mobile, token)) {
|
...
|
...
|
@@ -277,7 +276,7 @@ let verifyCode = (req, res, next) => { |
|
|
let mobile = +req.body.phoneNum;
|
|
|
let area = +(req.body.areaCode || 86);
|
|
|
let code = +req.body.code;
|
|
|
let inviteCode = +req.body.inviteCode || '';
|
|
|
let inviteCode = req.body.inviteCode || '';
|
|
|
|
|
|
/* 判断参数是否合法 */
|
|
|
if (!_.isNumber(mobile) || !_.isNumber(area) || !_.isNumber(code)) {
|
...
|
...
|
@@ -330,7 +329,7 @@ let passwordAction = (req, res, next) => { |
|
|
let mobile = +req.query.phoneNum;
|
|
|
let area = +(req.query.areaCode || 86);
|
|
|
let smsCode = +req.query.smsCode;
|
|
|
let inviteCode = +req.query.inviteCode || '';
|
|
|
let inviteCode = req.query.inviteCode || '';
|
|
|
|
|
|
// 判断是否允许访问, 不允许则跳转到错误页面
|
|
|
if (!smsCode || !_.isString(token) || !_.isNumber(mobile) ||
|
...
|
...
|
@@ -429,7 +428,6 @@ let setPassword = (req, res, next) => { |
|
|
refer = utils.refererLimit(refer);
|
|
|
}
|
|
|
|
|
|
|
|
|
delete req.session.phoneNum;
|
|
|
|
|
|
return res.json({
|
...
|
...
|
@@ -437,7 +435,8 @@ let setPassword = (req, res, next) => { |
|
|
message: '注册成功',
|
|
|
data: {
|
|
|
session: refer,
|
|
|
href: refer
|
|
|
href: '//m.yohobuy.com/activity/invite-reg',
|
|
|
msqDelivery: _.get(resultCopy, 'data.msqDelivery', '')
|
|
|
}
|
|
|
});
|
|
|
}).catch(next);
|
...
|
...
|
|