Showing
2 changed files
with
5 additions
and
2 deletions
@@ -29,7 +29,10 @@ const checkAPI = (req, res) => { | @@ -29,7 +29,10 @@ const checkAPI = (req, res) => { | ||
29 | }; | 29 | }; |
30 | 30 | ||
31 | const passwordRequired = (req, res, next) => { | 31 | const passwordRequired = (req, res, next) => { |
32 | - if (req.session.type === 'needCaptcha' && req.body.loginType === 'password') { | 32 | + |
33 | + // 默认账户密码登录需要验证码 | ||
34 | + //if (req.session.type === 'needCaptcha' && req.body.loginType === 'password') { | ||
35 | + if (req.body.loginType === 'password') { | ||
33 | return requiredAPI(req, res, next); | 36 | return requiredAPI(req, res, next); |
34 | } else { | 37 | } else { |
35 | return next(); | 38 | return next(); |
@@ -56,7 +56,7 @@ var $accountInput1 = $('#account1'), | @@ -56,7 +56,7 @@ var $accountInput1 = $('#account1'), | ||
56 | // 图像验证码 | 56 | // 图像验证码 |
57 | $passwordCaptchaWrap = $('.captcha-wrap'), | 57 | $passwordCaptchaWrap = $('.captcha-wrap'), |
58 | passwordCaptchaImg = new Captcha('.captcha-wrap', {checkURI: ''}).init(), | 58 | passwordCaptchaImg = new Captcha('.captcha-wrap', {checkURI: ''}).init(), |
59 | - isShowCaptchaImg = false, | 59 | + isShowCaptchaImg = true, |
60 | getPasswordCaptchaImgVal = function() { | 60 | getPasswordCaptchaImgVal = function() { |
61 | if (isShowCaptchaImg) { | 61 | if (isShowCaptchaImg) { |
62 | return passwordCaptchaImg.getResults(); | 62 | return passwordCaptchaImg.getResults(); |
-
Please register or login to post a comment