Authored by 郭成尧

login-problem

@@ -60,7 +60,7 @@ app.use(bodyParser.urlencoded({ @@ -60,7 +60,7 @@ app.use(bodyParser.urlencoded({
60 app.use(cookieParser()); 60 app.use(cookieParser());
61 61
62 app.use(session({ 62 app.use(session({
63 - name: 'yohobuy_session', 63 + name: 'yohobuy_session_cookie',
64 secret: '82dd7e724f2c6870472c89dfa43cf48d' 64 secret: '82dd7e724f2c6870472c89dfa43cf48d'
65 })); 65 }));
66 66
@@ -14,7 +14,7 @@ const QQStrategy = require('passport-qq').Strategy; @@ -14,7 +14,7 @@ const QQStrategy = require('passport-qq').Strategy;
14 const AlipayStrategy = require('./models/passport-alipay').Strategy; 14 const AlipayStrategy = require('./models/passport-alipay').Strategy;
15 15
16 const _ = require('lodash'); 16 const _ = require('lodash');
17 -const md5 = require('md5'); 17 +// const md5 = require('md5');
18 18
19 const config = global.yoho.config; 19 const config = global.yoho.config;
20 const logger = global.yoho.logger; 20 const logger = global.yoho.logger;
@@ -51,11 +51,11 @@ passport.use(new LocalStrategy({ @@ -51,11 +51,11 @@ passport.use(new LocalStrategy({
51 return done('登录账号格式错误', null); 51 return done('登录账号格式错误', null);
52 } 52 }
53 53
54 - let expire = req.cookies['LE' + md5('_LOGIN_EXPIRE')]; 54 + // let expire = req.cookies['LE' + md5('_LOGIN_EXPIRE')];
55 55
56 - if (_.isEmpty(expire) || expire < (new Date()).getTime() / 1000) {  
57 - return done('页面停留时间过长,请刷新页面', null);  
58 - } 56 + // if (_.isEmpty(expire) || expire < (new Date()).getTime() / 1000) {
  57 + // return done('页面停留时间过长,请刷新页面', null);
  58 + // }
59 59
60 let shoppingKey = cookie.getShoppingKey(req); 60 let shoppingKey = cookie.getShoppingKey(req);
61 61
@@ -40,9 +40,9 @@ module.exports = { @@ -40,9 +40,9 @@ module.exports = {
40 trace: false, 40 trace: false,
41 useCache: true, 41 useCache: true,
42 memcache: { 42 memcache: {
43 - master: ['127.0.0.1:11211'],  
44 - slave: ['127.0.0.1:11211'],  
45 - session: ['127.0.0.1:11211'], 43 + master: ['192.168.102.168:11211'],
  44 + slave: ['192.168.102.168:11211'],
  45 + session: ['192.168.102.168:11211'],
46 poolSize: 25, 46 poolSize: 25,
47 reconnect: 5000, 47 reconnect: 5000,
48 timeout: 1000, 48 timeout: 1000,