|
@@ -53,13 +53,12 @@ passport.use('local', new LocalStrategy({ |
|
@@ -53,13 +53,12 @@ passport.use('local', new LocalStrategy({ |
53
|
|
53
|
|
54
|
let clientIp = req.yoho.clientIp;
|
54
|
let clientIp = req.yoho.clientIp;
|
55
|
let errorLoginKey = 'loginErrorIp:' + clientIp;
|
55
|
let errorLoginKey = 'loginErrorIp:' + clientIp;
|
56
|
- let closePasswordLogin = _.get(req.app.locals.pc, 'login.closePasswordLogin', false);
|
56
|
+ let close = _.get(req.app.locals.pc, 'login.closePasswordLogin', false);
|
57
|
|
57
|
|
58
|
getLoginStat(clientIp).then((times) => {
|
58
|
getLoginStat(clientIp).then((times) => {
|
59
|
let errLoginTimes = _.parseInt(times) || 0;
|
59
|
let errLoginTimes = _.parseInt(times) || 0;
|
60
|
|
60
|
|
61
|
- return LoginApi.signin(type, area, username, password, shoppingKey, clientIp, closePasswordLogin).
|
|
|
62
|
- then((result) => {
|
61
|
+ return LoginApi.signin(type, area, username, password, shoppingKey, clientIp, close).then((result) => {
|
63
|
if (result.code && (result.code === 200 || result.code === 510) && result.data.uid) {
|
62
|
if (result.code && (result.code === 200 || result.code === 510) && result.data.uid) {
|
64
|
cache.del(errorLoginKey).catch(() => {});
|
63
|
cache.del(errorLoginKey).catch(() => {});
|
65
|
req.session.type = '';
|
64
|
req.session.type = '';
|