Browse Source

送礼物可以不走接口日志

lizhen_gitee 1 year ago
parent
commit
eb70e885cf
1 changed files with 9 additions and 0 deletions
  1. 9 0
      application/common/controller/Api.php

+ 9 - 0
application/common/controller/Api.php

@@ -482,6 +482,10 @@ class Api
         $controllername = $this->request->controller();
         $actionname     = $this->request->action();
 
+        if(strtolower($actionname) == 'givegifttoyou'){
+            return true;
+        }
+
         $data = [
             'uid'   => $this->auth->id,
             'api'   => $modulename.'/'.$controllername.'/'.$actionname,
@@ -496,6 +500,11 @@ class Api
     }
 
     protected function request_log_update($log_result){
+        $actionname     = $this->request->action();
+        if(strtolower($actionname) == 'givegifttoyou'){
+            return true;
+        }
+
         if(defined('API_REQUEST_ID')) { //记录app正常返回结果
             if(strlen(json_encode($log_result['data'])) > 10000) {
                 $log_result['data'] = '数据太多,不记录';