From 5fd2c5b29f6580f15d96ce3ce5c69445114c1548 Mon Sep 17 00:00:00 2001 From: limu <610543851@qq.com> Date: Thu, 22 Feb 2024 17:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 06038f7..313b8d1 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -445,8 +445,9 @@ class Auth extends BaseController $repository->syncBaseAuth($auth, $user); } $user = $repository->mainUser($user); - $repository->bindSpread($user, intval($data['spread']), 1); - + if(!empty($data['spread'])){ + $repository->bindSpread($user, intval($data['spread']), 1); + } $tokenInfo = $repository->createToken($user); $repository->loginAfter($user); //上级获得推荐分