...
|
...
|
@@ -10,6 +10,7 @@ const utils = require(global.utils); |
|
|
const RegService = require('../models/reg-service');
|
|
|
const PhoneService = require('../models/phone-service');
|
|
|
const AuthHelper = require('../models/auth-helper');
|
|
|
const logger = global.yoho.logger;
|
|
|
|
|
|
// constrant
|
|
|
const CODE_REQUIRED = '请输入校验码';
|
...
|
...
|
@@ -205,6 +206,7 @@ exports.indexCheck = (req, res, next) => { |
|
|
}
|
|
|
|
|
|
|
|
|
logger.info(`验证码校验结果:${captcode.toString() === captcodeValid},user:${captcode};server:${captcodeValid}`);
|
|
|
// 验证
|
|
|
if ([area, mobile].some(val => val === '')) {
|
|
|
return em.emit('reject', Object.assign(errorData, { message: '请填写手机号'}));
|
...
|
...
|
@@ -215,7 +217,7 @@ exports.indexCheck = (req, res, next) => { |
|
|
(captcodeValid && captcode === captcodeValid) || (testCode === config.testCode)
|
|
|
)
|
|
|
) {
|
|
|
return em.emit('reject', Object.assign(errorData, {message: '请将图片旋转到正确位置'}));
|
|
|
return em.emit('reject', Object.assign(errorData, {message: '请将图片旋转到正确方向'}));
|
|
|
}
|
|
|
|
|
|
// congratulation~~
|
...
|
...
|
|