Explorar el Código

暂停后台对极验验证

laiguoran hace 6 años
padre
commit
7ba82a5953

+ 6 - 6
modules/users/controllers/login_controller.js

@@ -215,12 +215,12 @@ class LoginController {
             // }
 
             // 判断极验验证码是否通过
-            const captcha = new Captcha();
-            const captchResult = await captcha.validate(request);
-            console.log(captchResult);
-            if (!captchResult) {
-                throw '极验验证码错误';
-            }
+            // const captcha = new Captcha();
+            // const captchResult = await captcha.validate(request);
+            // console.log(captchResult);
+            // if (!captchResult) {
+            //     throw '极验验证码错误';
+            // }
 
             // 判断用户是否开启了只使用短信登录
             const userInfo = await userModel.findDataByAccount(userData.mobile);

+ 1 - 1
web/users/html/login.html

@@ -49,7 +49,7 @@
             <div class="form-group">
                 <div id="captcha-box"></div>
             </div>
-            <div class="form-group btn-area">
+            <div class="form-group btn-area" style="display: none">
                 <button id="login" type="button" class="btn btn-primary btn-block">登录</button>
             </div>
             <div class="pt-1 d-flex justify-content-between">

+ 1 - 1
web/users/js/login.js

@@ -43,7 +43,7 @@ $(document).ready(function () {
         captchaObj.onSuccess(function () {
             $(".btn-area").slideDown("fast");
             // $('#login').click();
-            captchaObj.getValidate();
+            // captchaObj.getValidate();
         });
 
         $("#login").click(function () {