From f055eda88181c47eec1c083779fab870b22e19a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Thu, 8 Apr 2021 10:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/api/controller/wechat/AuthController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crmeb/app/api/controller/wechat/AuthController.php b/crmeb/app/api/controller/wechat/AuthController.php index 6b6855fde..692f60e24 100644 --- a/crmeb/app/api/controller/wechat/AuthController.php +++ b/crmeb/app/api/controller/wechat/AuthController.php @@ -67,8 +67,9 @@ class AuthController } catch (\Exception $e) { if ($e->getCode() == '-41003') return app('json')->fail('获取会话密匙失败'); } - if (!isset($userInfo['openId'])) return app('json')->fail('openid获取失败'); + if (!isset($userInfoCong['openid'])) return app('json')->fail('openid获取失败'); if (!isset($userInfo['unionId'])) $userInfo['unionId'] = ''; + $userInfo['openId'] = $userInfoCong['openid']; $userInfo['spid'] = $data['spread_spid']; $userInfo['code'] = $data['spread_code']; $userInfo['session_key'] = $session_key;