修改功能

master
ELF 4 years ago
parent 050eb98843
commit f37f6c51dd

@ -387,6 +387,15 @@ class UserController extends AdminController
$this->error('该手机号码已经添加过!'); $this->error('该手机号码已经添加过!');
} }
} }
$group = M('auth_group', 'sys_')->where(['id' => I('auth')])->find();
if (is_null($group)) {
$this->error('角色类型不存在!');
} else {
if (!IS_ROOT && strpos($group['title'], '市场专员') !== false && !isMarketLeader()) {
$this->error('市场专员编辑仅允许市场总监操作!');
}
}
// if (isset($_POST['mobile']) && $_POST['mobile'] != '') { // if (isset($_POST['mobile']) && $_POST['mobile'] != '') {
// $dx = A('Phone'); // $dx = A('Phone');
// $res = $dx->check_tel_code($_POST['mobile'], $_POST['code']); // $res = $dx->check_tel_code($_POST['mobile'], $_POST['code']);

@ -391,6 +391,19 @@ class BaseController extends HomeController
if ($permission == 'view-user-recharge') { if ($permission == 'view-user-recharge') {
$promoteService = new PromoteService(); $promoteService = new PromoteService();
$topPromote = $promoteService->getTopPromote($promote); $topPromote = $promoteService->getTopPromote($promote);
/**
* 市场部特殊推广公司的规则
*/
$onlyPresidentList = [330, 331, 332];
if (in_array($topPromote['company_id'], $onlyPresidentList)) {
if ($topPromote['can_view_recharge'] == 1 && $promote['level'] == 1) {
return true;
} else {
return false;
}
}
if ($topPromote['can_view_recharge'] == 1) { if ($topPromote['can_view_recharge'] == 1) {
return true; return true;
} }

Loading…
Cancel
Save