From 071ac9ea3814ecc1e78a7a71bc1dc3c833fa1215 Mon Sep 17 00:00:00 2001 From: weigang Date: Wed, 16 Sep 2020 19:48:10 +0800 Subject: [PATCH] union ID --- app/Service/v3/Implementations/WxLoginService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Service/v3/Implementations/WxLoginService.php b/app/Service/v3/Implementations/WxLoginService.php index 032e788..4b9828d 100644 --- a/app/Service/v3/Implementations/WxLoginService.php +++ b/app/Service/v3/Implementations/WxLoginService.php @@ -31,7 +31,7 @@ class WxLoginService implements \App\Service\v3\Interfaces\WxLoginServiceInterfa // 更新或者插入用户数据 $user = User::query()->firstOrCreate( ['openid' => $result['openid']], - ['unionid' => $result['unionid']] + ['unionid' => ($result['unionid'] ?? '')] )->toArray(); // 登录成功