lizhen_gitee 1 year ago
parent
commit
db2005ee6e
2 changed files with 12 additions and 0 deletions
  1. 4 0
      application/api/controller/Greet.php
  2. 8 0
      application/api/controller/User.php

+ 4 - 0
application/api/controller/Greet.php

@@ -115,6 +115,10 @@ class Greet extends Api
             ];
 
         }else{
+            if($this->auth->real_status != 1){
+                $this->error('请先完成真人认证');
+            }
+
             $type1 = Db::name('user_greet')->where('user_id',$this->auth->id)->where('status',1)->where('type',1)->orderRaw('rand()')->find();
 
             $type2 = Db::name('user_greet')->where('user_id',$this->auth->id)->where('status',1)->where('type',2)->orderRaw('rand()')->find();

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

@@ -912,6 +912,14 @@ class User extends Api
 
     //文字语音视频收费/隐藏所在位置设置
     public function chargeset() {
+
+        if($this->auth->gender == 1 && $this->auth->idcard_status != 1){
+            $this->error('请先完成实名认证');
+        }
+        if($this->auth->gender == 0 && $this->auth->real_status != 1){
+            $this->error('请先完成真人认证');
+        }
+
         $chat_id = input('chat_id', 0, 'intval'); //文字收费id
         $voice_id = input('voice_id', 0, 'intval'); //语音收费id
         $video_id = input('video_id', 0, 'intval'); //视频收费id