Skip to content

Commit

Permalink
返回 openId
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Jan 14, 2024
1 parent 179b4cd commit 1f81fc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/RPC/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -46,6 +46,7 @@ public function firstByCode(string $code, string $appid, int|OAuthType $type = O

return [
'id' => $user->id,
'openid' => $res['openid'],
];
}
}
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f81fc5

Please sign in to comment.