...
|
...
|
@@ -177,6 +177,8 @@ class Reg { |
|
|
let mobile = +req.body.phoneNum;
|
|
|
let area = +(req.body.areaCode || 86);
|
|
|
let inviteCode = req.body.inviteCode || '';
|
|
|
let udid = req.sessionID;
|
|
|
let captcha = req.body.captcha;
|
|
|
|
|
|
// 判断参数是否合法
|
|
|
if (!_.isNumber(mobile) || !_.isNumber(area)) {
|
...
|
...
|
@@ -184,8 +186,14 @@ class Reg { |
|
|
return res.json(data);
|
|
|
}
|
|
|
|
|
|
if (req.body.geetest_challenge) {
|
|
|
captcha = req.body.geetest_challenge; // TODO 使用极验证传特殊的值
|
|
|
}
|
|
|
|
|
|
// 向手机发送注册验证码
|
|
|
req.ctx(RegServiceModel).sendCodeToMobile({area, mobile}).then((result) => {
|
|
|
req.ctx(RegServiceModel).sendCodeToMobile({
|
|
|
area, mobile, udid, captcha
|
|
|
}).then((result) => {
|
|
|
if (result.code !== 200) {
|
|
|
data.message = result.message;
|
|
|
return res.json(data);
|
...
|
...
|
|