...
|
...
|
@@ -78,12 +78,16 @@ passport.use(new LocalStrategy({ |
|
|
udid,
|
|
|
degrees: captcha
|
|
|
}).then((result) => {
|
|
|
logger.info(`login result: ${JSON.stringify(result)}`);
|
|
|
|
|
|
if (result.code && result.code === 200 && result.data.uid) {
|
|
|
done(null, result.data);
|
|
|
} else if (result.code && result.code === 4189) {
|
|
|
done({code: 4189}, null);
|
|
|
} else if (result.code && result.code === 510) {
|
|
|
done(null, Object.assign(result.data, {weakPassword: true}));
|
|
|
} else if (result.code) {
|
|
|
done(result.message, null);
|
|
|
} else {
|
|
|
done('账号或密码不正确', null);
|
|
|
}
|
...
|
...
|
|