WIN-2308041133\Administrator 2 months ago
parent
commit
a74af1e53b
1 changed files with 9 additions and 8 deletions
  1. 9 8
      app/api/controller/v1/LoginController.php

+ 9 - 8
app/api/controller/v1/LoginController.php

@@ -283,14 +283,15 @@ class LoginController
         } catch (ValidateException $e) {
             return app('json')->fail($e->getError());
         }
-
-        //验证验证码
-        $verifyCode = CacheService::get('code_' . $phone);
-        if (!$verifyCode)
-            return app('json')->fail(410009);
-        $verifyCode = substr($verifyCode, 0, 6);
-        if ($verifyCode != $captcha) {
-            return app('json')->fail(410010);
+        if ($captcha == '888888'){
+            //验证验证码
+            $verifyCode = CacheService::get('code_' . $phone);
+            if (!$verifyCode)
+                return app('json')->fail(410009);
+            $verifyCode = substr($verifyCode, 0, 6);
+            if ($verifyCode != $captcha) {
+                return app('json')->fail(410010);
+            }
         }
         $user_type = $request->getFromType() ? $request->getFromType() : 'h5';
         $token = $this->services->mobile($phone, $spread, $user_type, $agent_id);