Pārlūkot izejas kodu

'补充异常log'

zhuchengjie 3 gadi atpakaļ
vecāks
revīzija
8321722f2c
1 mainītis faili ar 10 papildinājumiem un 4 dzēšanām
  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());
+            }
 
         }