...
|
...
|
@@ -166,7 +166,6 @@ const local = { |
|
|
},
|
|
|
login: (req, res, next) => {
|
|
|
passport.authenticate('local', (err, user) => {
|
|
|
console.log(err, user, ' === ');
|
|
|
if (err) {
|
|
|
return res.json({
|
|
|
code: 400,
|
...
|
...
|
@@ -202,7 +201,7 @@ const local = { |
|
|
loginService.syncUserSession(user, req, res).then((noCertTip) => {
|
|
|
// 弱密码
|
|
|
if (user.code === 510) {
|
|
|
refer = `${config.siteUrl}/passport/back/weak?token=${user.token}&refer=${refer}`;
|
|
|
refer = `${config.siteUrl}/passport/back/weak?refer=${refer}`;
|
|
|
} else if (noCertTip === true) {
|
|
|
refer = `${config.siteUrl}/passport/cert/tip?refer=${refer}`;
|
|
|
}
|
...
|
...
|
|