Showing
2 changed files
with
2 additions
and
2 deletions
@@ -91,7 +91,7 @@ passport.use(new LocalStrategy({ | @@ -91,7 +91,7 @@ passport.use(new LocalStrategy({ | ||
91 | cache.set(accountKey, accountTimes, 1800); | 91 | cache.set(accountKey, accountTimes, 1800); |
92 | cache.set(ipKey, ipTimes, 3600); | 92 | cache.set(ipKey, ipTimes, 3600); |
93 | 93 | ||
94 | - //再次校验 | 94 | + // 再次校验 |
95 | if (ipTimes >= 100) { | 95 | if (ipTimes >= 100) { |
96 | done('您尝试的次数过多,账号已被暂时锁定,请稍后再试', null); | 96 | done('您尝试的次数过多,账号已被暂时锁定,请稍后再试', null); |
97 | } else if (accountTimes >= 10) { | 97 | } else if (accountTimes >= 10) { |
@@ -81,7 +81,7 @@ const Auth = { | @@ -81,7 +81,7 @@ const Auth = { | ||
81 | }).catch(console.log); | 81 | }).catch(console.log); |
82 | }, | 82 | }, |
83 | rememberAccount(accountInfo, req, res) { | 83 | rememberAccount(accountInfo, req, res) { |
84 | - let aWeek = (new Date()).getTime() / 1000 + 504000; //504000-一周 | 84 | + let aWeek = (new Date()).getTime() / 1000 + 504000; // 504000-一周 |
85 | let rememKey = md5(md5(accountInfo.account + accountInfo.password + accountInfo.area)); | 85 | let rememKey = md5(md5(accountInfo.account + accountInfo.password + accountInfo.area)); |
86 | 86 | ||
87 | res.cookie('isRemember', true, aWeek); | 87 | res.cookie('isRemember', true, aWeek); |
-
Please register or login to post a comment