调整邀请注册

This commit is contained in:
luofei 2024-03-12 15:41:17 +08:00
parent d5fdcd2262
commit d36254a34a

View File

@ -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);