From 574b1fc469f394f92fbbcf4c58fcd2686ea945d0 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Fri, 9 Apr 2021 19:23:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E7=BB=91=E5=AE=9A=E5=BC=80=E6=94=BE=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/api/controller/wechat/AuthController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmeb/app/api/controller/wechat/AuthController.php b/crmeb/app/api/controller/wechat/AuthController.php index 692f60e24..1889c5661 100644 --- a/crmeb/app/api/controller/wechat/AuthController.php +++ b/crmeb/app/api/controller/wechat/AuthController.php @@ -68,7 +68,7 @@ class AuthController if ($e->getCode() == '-41003') return app('json')->fail('获取会话密匙失败'); } if (!isset($userInfoCong['openid'])) return app('json')->fail('openid获取失败'); - if (!isset($userInfo['unionId'])) $userInfo['unionId'] = ''; + $userInfo['unionId'] = isset($userInfoCong['unionid']) ? $userInfoCong['unionid'] : ''; $userInfo['openId'] = $userInfoCong['openid']; $userInfo['spid'] = $data['spread_spid']; $userInfo['code'] = $data['spread_code'];