Browse Source

开启报名验证

15954078560 2 years ago
parent
commit
95773f8b4b
1 changed files with 11 additions and 11 deletions
  1. 11 11
      application/api/controller/Index.php

+ 11 - 11
application/api/controller/Index.php

@@ -227,17 +227,17 @@ class Index extends Api
                 $this->error('请输入正确紧急联系人方式');
                 break;
             }
-//            //判断是否报名过
-//            $count = $active_people->where(['active_id' => $id, 'idcard' => $v['idcard'], 'status' => ['neq', 3]])->count('id');
-//            if ($count) {
-//                $this->error($v['name'] . $v['idcard'] . '已报名过该活动');
-//                break;
-//            }
-//            $count2 = $active_people_modify->where(['active_id' => $id, 'idcard' => $v['idcard'], 'status' => 0])->count('id');
-//            if ($count2) {
-//                $this->error($v['name'] . $v['idcard'] . '已提交过修改,请等待审核');
-//                break;
-//            }
+            //判断是否报名过
+            $count = $active_people->where(['active_id' => $id, 'idcard' => $v['idcard'], 'status' => ['neq', 3]])->count('id');
+            if ($count) {
+                $this->error($v['name'] . $v['idcard'] . '已报名过该活动');
+                break;
+            }
+            $count2 = $active_people_modify->where(['active_id' => $id, 'idcard' => $v['idcard'], 'status' => 0])->count('id');
+            if ($count2) {
+                $this->error($v['name'] . $v['idcard'] . '已提交过修改,请等待审核');
+                break;
+            }
             //判断证件类型和保险
             if (!$v['credtype'] || iconv_strlen($v['credtype'], 'utf-8') > 50) {
                 $this->error('证件类型错误');