配置修改

This commit is contained in:
2026-04-25 17:37:48 +08:00
parent 83a4a941ad
commit 3411c8b129

View File

@ -374,11 +374,14 @@ class DistributionLogic extends Logic
if($firstLeader->isEmpty()) { if($firstLeader->isEmpty()) {
throw new \think\Exception('无效的二维码'); throw new \think\Exception('无效的二维码');
} }
$user = User::where(['user_id' => $user_id]) $user = User::where(['id' => $user_id])
->find(); ->find();
if($user['first_leader'] != 0) { if($user['first_leader'] != 0) {
throw new \think\Exception('已扫码'); throw new \think\Exception('已扫码');
} }
if($post['user_id'] == $user_id) {
throw new \think\Exception('无法扫自己的码');
}
// 上级 // 上级
$first_leader_id = $firstLeader['id']; $first_leader_id = $firstLeader['id'];
$data = [ $data = [