浏览代码

'补充异常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());
+            }
 
         }