소스 검색

'补充异常log'

zhuchengjie 3 년 전
부모
커밋
8321722f2c
1개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. 10 4
      app/Http/Middleware/QuickAppUserInfoRefresh.php

+ 10 - 4
app/Http/Middleware/QuickAppUserInfoRefresh.php

@@ -27,10 +27,16 @@ class QuickAppUserInfoRefresh extends BaseMiddleware
         $token = $this->auth->setRequest($request)->getToken();
         if ($token) {
 
-            //获取用户信息
-            $user = $this->auth->authenticate($token);
-            // 设置全局信息
-            (new QappUserService)->setGolableUser($user->id, $package);
+            try {
+                //获取用户信息
+                $user = $this->auth->authenticate($token);
+
+                // 设置全局信息
+                (new QappUserService)->setGolableUser($user->id, $package);
+            } catch (\Exception $e) {
+                \Log::info('book_list_user_info_error:');
+                \Log::info($e->getMessage());
+            }
 
         }