瀏覽代碼

实名认证验证

zhangxiaobin 1 年之前
父節點
當前提交
c59f1dd56e
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      application/api/controller/User.php

+ 6 - 0
application/api/controller/User.php

@@ -929,6 +929,12 @@ class User extends Api
             if (empty($idCard)) {
                 throw new Exception('请输入身份证号');
             }
+            $userAuthWhere['user_id'] = ['neq',$this->auth->id];
+            $userAuthWhere['idcard'] = $idCard;
+            $userAuth = model('UserAuth')->where($userAuthWhere)->find();
+            if (!empty($userAuth)) {
+                throw new Exception('该身份证号已被其他用户实名验证过');
+            }
             /*$userService = new UserService();
             $faceParams = [
                 'real_name' => $realName,