Browse Source

语音匹配,视频匹配的开关

lizhen_gitee 11 months ago
parent
commit
47a5f1a8f4
2 changed files with 10 additions and 0 deletions
  1. 8 0
      application/api/controller/Match.php
  2. 2 0
      application/extra/site.php

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

@@ -429,6 +429,10 @@ class Match extends Api
     //语音匹配
     public function getaudiouser(){
 
+        if(config('site.index_match_audio_switch') != 1){
+            $this->error('该功能暂未开启');
+        }
+
         //给出备选用户
         $map = [
             'user.status' =>1,                                       //未封禁用户
@@ -478,6 +482,9 @@ class Match extends Api
     //视频匹配
     public function getvideouser(){
 
+        if(config('site.index_match_video_switch') != 1){
+            $this->error('该功能暂未开启');
+        }
         //给出备选用户
         $map = [
             'user.status' =>1,                                       //未封禁用户
@@ -525,6 +532,7 @@ class Match extends Api
     }
 
     //聊天匹配
+    //没有用到
     public function gettypinguser(){
 
         //给出备选用户

+ 2 - 0
application/extra/site.php

@@ -113,4 +113,6 @@ return array (
   'apisite_switch' => '1',
   'apisite_notice' => '全站维护中!!',
   'man_dashan_times' => '20',
+  'index_match_video_switch' => '1',
+  'index_match_audio_switch' => '1',
 );