Browse Source

性别对立

lizhen_gitee 10 months ago
parent
commit
03b4d12c5d

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

@@ -118,7 +118,7 @@ class Index extends Api
         }
 
         $where = [
-            'gender' => ['neq',$this->auth->gender],
+            'gender' => $this->auth->gender == 1 ? 0 : 1,
             'status' => 1,
         ];
         if(is_numeric($keyword)){

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

@@ -184,7 +184,7 @@ class Topicdongtai extends Api
 
 
         //性别
-        $where['user.gender'] = ['neq',$this->auth->gender];
+        $where['user.gender'] = $this->auth->gender == 1 ? 0 : 1;
 
         //排除黑名单的
         $where_black = [];