|
|
@ -377,15 +377,18 @@ class PromoteModel extends Model{
|
|
|
|
$result = [];
|
|
|
|
$result = [];
|
|
|
|
switch ($level) {
|
|
|
|
switch ($level) {
|
|
|
|
case 1: // 会长
|
|
|
|
case 1: // 会长
|
|
|
|
$result = $this->field("id, nickname")->where("grand_id = 0 and parent_id = 0")->select();
|
|
|
|
$result = $this->field("id, nickname, account, real_name")->where("grand_id = 0 and parent_id = 0")->select();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2: // 组长
|
|
|
|
case 2: // 组长
|
|
|
|
$result = $this->field("id, nickname")->where("grand_id = 0 and parent_id > 0")->select();
|
|
|
|
$result = $this->field("id, nickname, account, real_name")->where("grand_id = 0 and parent_id > 0")->select();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3: //组员
|
|
|
|
case 3: //组员
|
|
|
|
$result = $this->field("id, nickname")->where("parent_id > 0 and grand_id > 0")->select();
|
|
|
|
$result = $this->field("id, nickname, account, real_name")->where("parent_id > 0 and grand_id > 0")->select();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($result as &$item) {
|
|
|
|
|
|
|
|
$item['nickname'] = "{$item['account']}({$item['real_name']})";
|
|
|
|
|
|
|
|
}
|
|
|
|
return $result;
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|