Skip to content

Commit

Permalink
upgrade easywechat
Browse files Browse the repository at this point in the history
  • Loading branch information
shirne committed Jul 22, 2024
1 parent 43cc127 commit ad13433
Show file tree
Hide file tree
Showing 3 changed files with 267 additions and 331 deletions.
4 changes: 2 additions & 2 deletions src/application/api/controller/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public function wxAutoLogin($wxid, $code)
}
if ($weapp instanceof Application) {
try {
$userinfo = $weapp->oauth->user()->getOriginal();
$userinfo = $weapp->oauth->userFromCode($code)->getRaw();
} catch (Exception $e) {
$this->error('登录失败:' . $e->getMessage(), ERROR_LOGIN_FAILED);
}
Expand Down Expand Up @@ -459,7 +459,7 @@ public function wxLogin($wxid, $code, $rawData = null, $phoneCode = null)
$mobileData = [];
if ($weapp instanceof Application) {
try {
$userinfo = $weapp->oauth->user()->getOriginal();
$userinfo = $weapp->oauth->userFromCode($code)->getRaw();
} catch (Exception $e) {
$this->error('登录失败:' . $e->getMessage(), ERROR_LOGIN_FAILED);
}
Expand Down
2 changes: 1 addition & 1 deletion src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"endroid/qr-code": "^2.5|^5.0.7",
"phpoffice/phpspreadsheet": "^1.8",
"phpmailer/phpmailer": "^6.5.0",
"overtrue/wechat": "^4.6.0",
"overtrue/wechat": "^5.35.1",
"aliyuncs/oss-sdk-php": "^2.3",
"alibabacloud/green": "^1.7",
"alibabacloud/dysmsapi": "^1.7",
Expand Down
Loading

0 comments on commit ad13433

Please sign in to comment.