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); //上级获得推荐分