Browse Source

会员升级

Kirin 1 year ago
parent
commit
437b1f0a5a
1 changed files with 7 additions and 7 deletions
  1. 7 7
      app/controller/api/v1/LoginController.php

+ 7 - 7
app/controller/api/v1/LoginController.php

@@ -339,13 +339,13 @@ class LoginController
         }
 
         //验证验证码
-//        $verifyCode = CacheService::get('code_' . $phone);
-//        if (!$verifyCode)
-//            return app('json')->fail('请先获取验证码');
-//        $verifyCode = substr($verifyCode, 0, 6);
-//        if ($verifyCode != $captcha) {
-//            return app('json')->fail('验证码错误');
-//        }
+        $verifyCode = CacheService::get('code_' . $phone);
+        if (!$verifyCode)
+            return app('json')->fail('请先获取验证码');
+        $verifyCode = substr($verifyCode, 0, 6);
+        if ($verifyCode != $captcha) {
+            return app('json')->fail('验证码错误');
+        }
         $user_type = $request->getFromType() ? $request->getFromType() : 'h5';
         $token = $this->services->mobile($phone, $spread_spid, $user_type);
         if ($token) {