Browse Source

个人签名不能重复提交

lizhen_gitee 1 năm trước cách đây
mục cha
commit
3f23c12136
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      application/api/controller/User.php

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

@@ -370,6 +370,12 @@ class User extends Api
         //关于我,是否需要审核
         $user_bio_audit_switch = config('site.user_bio_audit_switch');
         if(isset($data['bio']) && !empty($data['bio']) && $user_bio_audit_switch == 1){
+
+            $check_exist = Db::name('user_audit')->where('user_id',$this->auth->id)->where('status',0)->find();
+            if(!empty($check_exist)){
+                $this->error('信息已提交等待审核,请勿重复提交');
+            }
+
             if($data['bio'] != $this->auth->bio){
                 $bio_data = [
                     'user_id' => $this->auth->id,