From 5a9b2be053d568f187caf4bf1e97b6e8ca8eed11 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 14 Jan 2026 16:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/controller/UploadController.php | 3 +++ app/common/logic/AuthLogic.php | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/common/controller/UploadController.php b/app/common/controller/UploadController.php index e9ab8d0..ef9c2f7 100644 --- a/app/common/controller/UploadController.php +++ b/app/common/controller/UploadController.php @@ -65,6 +65,7 @@ class UploadController } return $this->error('file not found'); } catch (\Throwable $e) { + Log::info('uploadFile',[$e->getMessage(),$e->getFile(),$e->getLine()]); return $this->error($e->getMessage()); } } @@ -110,6 +111,7 @@ class UploadController return $this->success($data); }catch (\Throwable $e){ + Log::info('uploadFile',[$e->getMessage(),$e->getFile(),$e->getLine()]); return $this->error($e->getMessage()); } } @@ -155,6 +157,7 @@ class UploadController return $this->success($data); } catch (\Throwable $e) { // return json(['errno' => 1, 'message' => $e->getMessage()]); + Log::info('uploadFile',[$e->getMessage(),$e->getFile(),$e->getLine()]); return $this->error($e->getMessage()); } } diff --git a/app/common/logic/AuthLogic.php b/app/common/logic/AuthLogic.php index ad1142e..8339ecb 100644 --- a/app/common/logic/AuthLogic.php +++ b/app/common/logic/AuthLogic.php @@ -216,9 +216,7 @@ class AuthLogic if ($userInfo['code'] != 0) { throw new BusinessException('授权失败,请重试'); } - - - Log::info('userInfo:' ,[$userInfo]); + User::firstOrCreate(['union_id'=>$userInfo['data']['union_id']],[ 'union_id'=>$userInfo['data']['union_id'], 'name'=>$userInfo['data']['name'],