Authored by 周少峰

add locallogin cap

... ... @@ -29,7 +29,10 @@ const checkAPI = (req, res) => {
};
const passwordRequired = (req, res, next) => {
if (req.session.type === 'needCaptcha' && req.body.loginType === 'password') {
// 默认账户密码登录需要验证码
//if (req.session.type === 'needCaptcha' && req.body.loginType === 'password') {
if (req.body.loginType === 'password') {
return requiredAPI(req, res, next);
} else {
return next();
... ...
... ... @@ -56,7 +56,7 @@ var $accountInput1 = $('#account1'),
// 图像验证码
$passwordCaptchaWrap = $('.captcha-wrap'),
passwordCaptchaImg = new Captcha('.captcha-wrap', {checkURI: ''}).init(),
isShowCaptchaImg = false,
isShowCaptchaImg = true,
getPasswordCaptchaImgVal = function() {
if (isShowCaptchaImg) {
return passwordCaptchaImg.getResults();
... ...