diff --git a/app/api/service/passport/Login.php b/app/api/service/passport/Login.php index 49e7f983..425922b6 100644 --- a/app/api/service/passport/Login.php +++ b/app/api/service/passport/Login.php @@ -330,7 +330,7 @@ class Login extends BaseService return; } // 推荐人ID - $refereeId = (int)$data['refereeId'] ?? null; + $refereeId = !empty($data['refereeId']) ?? null; // 用户不存在: 创建一个新用户 $this->createUser($data['mobile'], $data['isParty'], $data['partyData'], $refereeId); }