Authored by htoooth

fix

@@ -98,8 +98,8 @@ app.use((req, res, next) => { @@ -98,8 +98,8 @@ app.use((req, res, next) => {
98 98
99 // req.app.locals = _.merge(req.app.locals, { 99 // req.app.locals = _.merge(req.app.locals, {
100 // pc: { 100 // pc: {
101 - // login: {  
102 - // closePasswordLogin: true 101 + // geetest: {
  102 + // validation: true
103 // } 103 // }
104 // } 104 // }
105 // }); 105 // });
@@ -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 = '';