...
|
...
|
@@ -99,7 +99,7 @@ class SmsLogin { |
|
|
|
|
|
// 验证
|
|
|
if ([area, mobile].some(val => val === '')) {
|
|
|
return em.emit('reject', Object.assign(errorData, { message: '请填写手机号'}));
|
|
|
return em.emit('reject', Object.assign(errorData, { message: '请填写手机号' }));
|
|
|
}
|
|
|
|
|
|
// congratulation~~
|
...
|
...
|
@@ -201,6 +201,7 @@ class SmsLogin { |
|
|
const mobile = _.get(req.session, 'smsLogin.mobile', '');
|
|
|
const area = _.get(req.session, 'smsLogin.area', '');
|
|
|
const shopping_key = cookie.getShoppingKey(req); // eslint-disable-line
|
|
|
let from = req.cookies.from || 'yohobuy';
|
|
|
|
|
|
if (!mobile || !area) {
|
|
|
res.json({
|
...
|
...
|
@@ -261,7 +262,8 @@ class SmsLogin { |
|
|
profile: mobile,
|
|
|
code: r2.data.code,
|
|
|
area,
|
|
|
shopping_key
|
|
|
shopping_key,
|
|
|
from
|
|
|
})
|
|
|
.then(info => {
|
|
|
if (info.code !== 200) {
|
...
|
...
|
@@ -309,6 +311,7 @@ class SmsLogin { |
|
|
let password = (req.body.password || '').trim();
|
|
|
let registerCode = req.body.registerCode || '';
|
|
|
let clientIp = req.yoho.clientIp || '';
|
|
|
let from = req.cookies.from || 'yohobuy';
|
|
|
|
|
|
if (!password) {
|
|
|
data.message = PASSWORD_REQUIRED;
|
...
|
...
|
@@ -331,7 +334,8 @@ class SmsLogin { |
|
|
// 验证注册的标识码是否有效
|
|
|
let resultCopy = null;
|
|
|
|
|
|
RegService.regMobileAes(area, mobile, password, shoppingKey, registerCode, null, clientIp).then(result => {
|
|
|
RegService.regMobileAes(area, mobile, password,
|
|
|
shoppingKey, registerCode, null, clientIp, from).then(result => {
|
|
|
if (!result.code || result.code !== 200) {
|
|
|
return res.send(result);
|
|
|
}
|
...
|
...
|
|