...
|
...
|
@@ -7,6 +7,7 @@ const sign = global.yoho.sign; |
|
|
const co = require('bluebird').coroutine;
|
|
|
const cookie = global.yoho.cookie;
|
|
|
const AuthHelperModel = require('../models/auth-helper');
|
|
|
const config = global.yoho.config;
|
|
|
|
|
|
class Reg {
|
|
|
/**
|
...
|
...
|
@@ -179,6 +180,7 @@ class Reg { |
|
|
let inviteCode = req.body.inviteCode || '';
|
|
|
let udid = req.sessionID;
|
|
|
let captcha = req.body.captcha;
|
|
|
let superCapture = '';
|
|
|
|
|
|
// 判断参数是否合法
|
|
|
if (!_.isNumber(mobile) || !_.isNumber(area)) {
|
...
|
...
|
@@ -187,12 +189,13 @@ class Reg { |
|
|
}
|
|
|
|
|
|
if (req.body.geetest_challenge) {
|
|
|
captcha = req.body.geetest_challenge; // TODO 使用极验证传特殊的值
|
|
|
captcha = '';
|
|
|
superCapture = config.superCapture;
|
|
|
}
|
|
|
|
|
|
// 向手机发送注册验证码
|
|
|
req.ctx(RegServiceModel).sendCodeToMobile({
|
|
|
area, mobile, udid, captcha
|
|
|
area, mobile, udid, captcha, superCapture
|
|
|
}).then((result) => {
|
|
|
if (result.code !== 200) {
|
|
|
data.message = result.message;
|
...
|
...
|
|