Authored by 毕凯

登录接口验证码

... ... @@ -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);
}
... ...
... ... @@ -43,7 +43,7 @@ class AuthModel extends global.yoho.BaseModel {
business_line: FROM[params.from].business_line,
udid: params.udid,
fromPage: PAGE,
degrees: params.captcha
degrees: params.degrees
};
if (params.shoppingKey) {
... ...