...
|
...
|
@@ -184,6 +184,8 @@ let sendBindMsg = (req, res, next) => { |
|
|
/* 向手机发送注册验证码 */
|
|
|
let result = yield regService.sendCodeToMobile(area, mobile);
|
|
|
|
|
|
req.session.type = 'register-step1';
|
|
|
|
|
|
return cache.set(sendCodeKey, sendCodeTimes + 1, 3600).then(() => {
|
|
|
if (result.code) {
|
|
|
return res.json(result);
|
...
|
...
|
@@ -229,6 +231,10 @@ let mobileRegister = (req, res, next) => { |
|
|
data: ''
|
|
|
};
|
|
|
|
|
|
if (req.session.type !== 'register-step1') {
|
|
|
return res.json(data);
|
|
|
}
|
|
|
|
|
|
/* 判断是否是有效的注册方式,防注册机刷 */
|
|
|
let regExpireTime = req.session.REG_EXPIRE_;
|
|
|
|
...
|
...
|
@@ -273,6 +279,9 @@ let mobileRegister = (req, res, next) => { |
|
|
return res.json(data);
|
|
|
}
|
|
|
|
|
|
// 清除 session type
|
|
|
req.session.type = '';
|
|
|
|
|
|
let uid = {
|
|
|
toString() {
|
|
|
return this.uid;
|
...
|
...
|
|