|
@@ -177,6 +177,8 @@ class Reg { |
|
@@ -177,6 +177,8 @@ class Reg { |
177
|
let mobile = +req.body.phoneNum;
|
177
|
let mobile = +req.body.phoneNum;
|
178
|
let area = +(req.body.areaCode || 86);
|
178
|
let area = +(req.body.areaCode || 86);
|
179
|
let inviteCode = req.body.inviteCode || '';
|
179
|
let inviteCode = req.body.inviteCode || '';
|
|
|
180
|
+ let udid = req.sessionID;
|
|
|
181
|
+ let captcha = req.body.captcha;
|
180
|
|
182
|
|
181
|
// 判断参数是否合法
|
183
|
// 判断参数是否合法
|
182
|
if (!_.isNumber(mobile) || !_.isNumber(area)) {
|
184
|
if (!_.isNumber(mobile) || !_.isNumber(area)) {
|
|
@@ -184,8 +186,14 @@ class Reg { |
|
@@ -184,8 +186,14 @@ class Reg { |
184
|
return res.json(data);
|
186
|
return res.json(data);
|
185
|
}
|
187
|
}
|
186
|
|
188
|
|
|
|
189
|
+ if (req.body.geetest_challenge) {
|
|
|
190
|
+ captcha = req.body.geetest_challenge; // TODO 使用极验证传特殊的值
|
|
|
191
|
+ }
|
|
|
192
|
+
|
187
|
// 向手机发送注册验证码
|
193
|
// 向手机发送注册验证码
|
188
|
- req.ctx(RegServiceModel).sendCodeToMobile({area, mobile}).then((result) => {
|
194
|
+ req.ctx(RegServiceModel).sendCodeToMobile({
|
|
|
195
|
+ area, mobile, udid, captcha
|
|
|
196
|
+ }).then((result) => {
|
189
|
if (result.code !== 200) {
|
197
|
if (result.code !== 200) {
|
190
|
data.message = result.message;
|
198
|
data.message = result.message;
|
191
|
return res.json(data);
|
199
|
return res.json(data);
|