master
jbrazz 5 years ago
parent a190ff4a17
commit 8859c847f6

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

@ -125,6 +125,7 @@
<option value="">请选择推广员等级</option> <option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option> <option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>组长</option> <option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>组长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组员</option>
</select> </select>
- -
</div> </div>

@ -102,6 +102,7 @@
<option value="">请选择推广员等级</option> <option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option> <option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>组长</option> <option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>组长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组员</option>
</select> </select>
- -
</div> </div>

@ -74,6 +74,7 @@
<option value="">请选择推广员等级</option> <option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option> <option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>组长</option> <option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>组长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组员</option>
</select> </select>
- -
</div> </div>

Loading…
Cancel
Save