Authored by htoooth

add fix

... ... @@ -35,7 +35,16 @@ router.post('/passport/login/qrcode/refresh', login.local.qrcode.refresh);
router.post('/passport/login/qrcode/check', login.local.qrcode.check); // 验证二维码的状态
router.get('/passport/login', login.common.beforeLogin, login.local.loginPage);
router.post('/passport/login/auth', captcha.requiredAPI, login.local.login);
router.post('/passport/login/auth',
(req, res, next) => {
if (req.body.loginType === 'password') {
return captcha.requiredAPI(req, res, next);
} else {
return next();
}
},
login.local.login
);
router.get('/passport/logout', login.local.logout);
// 微信登录
... ...
... ... @@ -250,6 +250,8 @@ var tpl = function(text) {
].join('');
};
require('../../common/promise');
// 切换登录方式
accountChangeEvent.add(function(type) {
currentLogin = AccountLoginData[type];
... ... @@ -279,9 +281,9 @@ accountChangeEvent.add(function(type) {
if ($showCaptchaImg) {
$captchaImgWrapper.removeClass('hide');
setTimeout(function() {
$.sleep(500).then(function() {
captchaImg.refresh();
}, 500);
});
}
}
... ... @@ -651,7 +653,9 @@ function validateSmsCaptchaImg() {
}
function refreshSmsCaptchaImg() {
smsCaptchaImg.refresh();
$.sleep(1000).then(function() {
smsCaptchaImg.refresh();
});
}
/** ************************************************************************/
... ...