Browse Source

首页动态也要登录

lizhen_gitee 3 months ago
parent
commit
3523a252b8
2 changed files with 5 additions and 5 deletions
  1. 1 1
      application/api/controller/Dongtai.php
  2. 4 4
      application/common/controller/Api.php

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

@@ -9,7 +9,7 @@ use think\Db;
  */
 class Dongtai extends Api
 {
-    protected $noNeedLogin = ['info'];
+    protected $noNeedLogin = ['*'];
     protected $noNeedRight = ['*'];
 
     public function dongtai()

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

@@ -451,15 +451,15 @@ class Api
     protected function request_log_update($log_result){
 
         if ($this->logType === 1){
-            if (strlen(json_encode($log_result['data'])) > 1000) {
+            /*if (strlen(json_encode($log_result['data'])) > 1000) {
                 $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) {
+                /*if(strlen(json_encode($log_result['data'])) > 1000) {
                     $log_result['data'] = '数据太多,不记录';
-                }
+                }*/
                 db('api_request_log')->where('id',API_REQUEST_ID)->update(['result'=>json_encode($log_result)]);
             }
         }