dever 3 years ago
parent
commit
703e95e112
1 changed files with 15 additions and 0 deletions
  1. 15 0
      service/agent/src/Auth.php

+ 15 - 0
service/agent/src/Auth.php

@@ -103,6 +103,21 @@ class Auth
         return $msg;
     }
 
+    # 获取验证码是否正确
+    public function checkMcode()
+    {
+        $mobile = Dever::input('mobile');
+        $code = Dever::input('mcode');
+        if (!$code) {
+            Dever::alert('请输入验证码');
+        }
+        $code = Dever::load('passport/reg')->mcode($mobile, $code, false);
+        if (!$code) {
+            Dever::alert('验证码输入错误');
+        }
+        return 'ok';
+    }
+
 	/**
      * 获取手机验证码
      * @return mixed