lizhen_gitee 11 months ago
parent
commit
678bfbf0ab
2 changed files with 6 additions and 3 deletions
  1. 4 1
      application/api/controller/Index.php
  2. 2 2
      application/common/controller/Api.php

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

@@ -169,7 +169,10 @@ class Index extends Api
             $this->error();
         }
 
-        $where = [];
+        $where = [
+            'gender' => ['neq',$this->auth->gender],
+            'status' => 1,
+        ];
         if(is_numeric($keyword)){
             $where['username'] = intval($keyword);
         }else{

+ 2 - 2
application/common/controller/Api.php

@@ -436,13 +436,13 @@ class Api
 
         if ($this->logType === 1){
             if (strlen(json_encode($log_result['data'])) > 1000) {
-                $log_result['data'] = '数据太多,不记录';
+                //$log_result['data'] = '数据太多,不记录';
             }
             LogUtil::info('result', 'Api-Middleware-Log', 'request_log', $log_result);
         }else{
             if(defined('API_REQUEST_ID')) { //记录app正常返回结果
                 if(strlen(json_encode($log_result['data'])) > 1000) {
-                    $log_result['data'] = '数据太多,不记录';
+                    //$log_result['data'] = '数据太多,不记录';
                 }
                 db('api_request_log')->where('id',API_REQUEST_ID)->update(['result'=>json_encode($log_result)]);
             }