ソースを参照

关键词过滤与关键词接口

lizhen_gitee 1 年間 前
コミット
4ae8daa8e3

+ 7 - 0
application/api/controller/Index.php

@@ -692,4 +692,11 @@ class Index extends Api
             $this->error($e->getMessage());
         }
     }
+
+    //关键字过滤
+    public function keyworld_config(){
+        $config = config('keyworld');
+        $this->success('success',$config);
+    }
+
 }

+ 2 - 2
application/api/controller/Topicdongtai.php

@@ -25,7 +25,7 @@ class Topicdongtai extends Api
         }
 
         //关键字替换
-        //$content = Keyworld::sensitive($content);
+        $content = Keyworld::sensitive($content);
 
         $data = [
             'topic_id' => $topic_id,
@@ -239,7 +239,7 @@ class Topicdongtai extends Api
         }
 
         //关键字替换
-        //$content = Keyworld::sensitive($content);
+        $content = Keyworld::sensitive($content);
 
         //判断
         if($level == 2 && $floor == 0){