浏览代码

园区模糊搜索

chenhao 4 年之前
父节点
当前提交
a2480b3756
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      application/api/controller/User.php

+ 4 - 4
application/api/controller/User.php

@@ -115,10 +115,10 @@ class User extends Api
         if ($mobile && !Validate::regex($mobile, "^1\d{10}$")) {
             $this->error(__('Mobile is incorrect'));
         }
-//        $ret = Sms::check($mobile, $code, 'register');
-//        if (!$ret) {
-//            $this->error('验证码出错 ');
-//        }
+        $ret = session($mobile);
+        if (!$ret || $ret != $code) {
+            $this->error(__('Captcha is incorrect'));
+        }
         if (!$group_id) {
             $group_id = 0;
         }