...
|
...
|
@@ -10,7 +10,6 @@ const UserService = require('../models/user-service'); |
|
|
const LoginService = require('../models/login-service');
|
|
|
const config = require('../../../config/common');
|
|
|
const safeRedirect = require('../../../doraemon/middleware/safe-redirect').safeRedirect;
|
|
|
const captcha = require('./captcha');
|
|
|
|
|
|
let helpers = global.yoho.helpers;
|
|
|
let cache = global.yoho.cache;
|
...
|
...
|
@@ -158,9 +157,10 @@ let sendBindMsg = (req, res, next) => { |
|
|
// let checkNum = yield cache.get(`regCheckMobileNum_${mobile}`);
|
|
|
|
|
|
// 检查上次的发送短信号码
|
|
|
if (captcha.checkSendMobile(req, res, true)) {
|
|
|
if (req.session.sendMobile && req.session.sendMobile !== mobile) {
|
|
|
req.session.sendMobile = '';
|
|
|
data.message = '发送失败';
|
|
|
req.session.captcha = '';
|
|
|
data.message = '验证码失效';
|
|
|
return res.json(data);
|
|
|
}
|
|
|
|
...
|
...
|
|