From 1f81fc5a24a1d45d06919c0d45518ab69320109f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Sun, 14 Jan 2024 12:32:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=20openId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/RPC/UserService.php | 3 ++- composer.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/RPC/UserService.php b/app/RPC/UserService.php index 26b4b47..ba32b47 100644 --- a/app/RPC/UserService.php +++ b/app/RPC/UserService.php @@ -30,7 +30,7 @@ public function ping(): bool return true; } - #[ArrayShape(['id' => 'int'])] + #[ArrayShape(['id' => 'int', 'openid' => 'string'])] public function firstByCode(string $code, string $appid, int|OAuthType $type = OAuthType::WECHAT_MINI_APP): array { if (is_int($type)) { @@ -46,6 +46,7 @@ public function firstByCode(string $code, string $appid, int|OAuthType $type = O return [ 'id' => $user->id, + 'openid' => $res['openid'], ]; } } diff --git a/composer.lock b/composer.lock index f326d40..1fd9107 100644 --- a/composer.lock +++ b/composer.lock @@ -294,16 +294,16 @@ }, { "name": "gemini-d/plt-common", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/Gemini-D/plt-common.git", - "reference": "b2ebca6e9e8e03595fe6463166278834f1e6bdd1" + "reference": "986fe5eef43f0dd93ae9dcca56b04491a1244e96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Gemini-D/plt-common/zipball/b2ebca6e9e8e03595fe6463166278834f1e6bdd1", - "reference": "b2ebca6e9e8e03595fe6463166278834f1e6bdd1", + "url": "https://api.github.com/repos/Gemini-D/plt-common/zipball/986fe5eef43f0dd93ae9dcca56b04491a1244e96", + "reference": "986fe5eef43f0dd93ae9dcca56b04491a1244e96", "shasum": "" }, "require": { @@ -349,9 +349,9 @@ ], "support": { "issues": "https://github.com/Gemini-D/plt-common/issues", - "source": "https://github.com/Gemini-D/plt-common/tree/v1.0.0" + "source": "https://github.com/Gemini-D/plt-common/tree/v1.0.1" }, - "time": "2024-01-06T04:28:03+00:00" + "time": "2024-01-14T04:29:00+00:00" }, { "name": "graham-campbell/result-type",