From d36254a34ac47c65163e27a2fd8cc40c904fa127 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Tue, 12 Mar 2024 15:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=82=80=E8=AF=B7=E6=B3=A8?= =?UTF-8?q?=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index f33ab5e5..a5831380 100755 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -753,11 +753,12 @@ class Auth extends BaseController $isNewUser = true; $user = $repository->registr($data['phone'], null, $data['user_type']); } + $spreadId = empty($data['spread']) ? $user['spread_uid'] : $data['spread']; if ($auth && !$user['wechat_user_id']) { $repository->syncBaseAuth($auth, $user); } $user = $repository->mainUser($user); - $repository->bindSpread($user, intval($data['spread'])); + $repository->bindSpread($user, intval($spreadId)); $tokenInfo = $repository->createToken($user); $repository->loginAfter($user);