liche update for super admin not check ip and show full mobile

This commit is contained in:
xxb
2021-09-14 11:26:14 +08:00
parent 55de3071ef
commit e95a593b73
3 changed files with 25 additions and 5 deletions
+10 -2
View File
@@ -102,7 +102,11 @@ class Clues extends HD_Controller
$val['cf_title'] = isset($cf_rows[$val['cf_id']]) ? $cf_rows[$val['cf_id']][0]['title'] : '';
$val['status_name'] = $status_arr[$val['status']];
$val['admin_name'] = isset($map_admin[$val['admin_id']]) ? $map_admin[$val['admin_id']] : '';
$val['mobile_sub'] = $val['mobile'] ? substr_replace($val['mobile'], '*****', 0, 5) : '';
if(SUPER_ADMIN == $this->role){
$val['mobile_sub'] = $val['mobile'];
} else {
$val['mobile_sub'] = $val['mobile'] ? substr_replace($val['mobile'], '*****', 0, 5) : '';
}
$lists[] = $val;
}
}
@@ -138,7 +142,11 @@ class Clues extends HD_Controller
$info_show['status2List'] = array(array("id" => 1, "name" => '未回访'), array("id" => 2, "name" => '已回访'));
$info_show['c_time'] = date('Y-m-d H:i', $re['c_time']);
$info_show['en_time'] = $re['en_time'];
$info_show['mobile_sub'] = $re['mobile'] ? substr_replace($re['mobile'], '*****', 0, 5) : '';
if(SUPER_ADMIN == $this->role){
$info_show['mobile_sub'] = $re['mobile'];
} else {
$info_show['mobile_sub'] = $re['mobile'] ? substr_replace($re['mobile'], '*****', 0, 5) : '';
}
$resLogs = $this->mdOplogs->select(array('clue_id' => $id), 'c_time desc', 0, 0);
foreach ($resLogs as $key => $value) {
$setValue = array();
+12 -2
View File
@@ -93,11 +93,16 @@ class Customer extends HD_Controller
$biz_id_arr = array_unique(array_column($rows, 'biz_id'));
$biz_id_arr && $biz_rows = $this->biz_model->get_map_by_ids($biz_id_arr, 'id,biz_name');
foreach ($rows as $key => $val) {
if(SUPER_ADMIN == $this->role){
$mobile_sub = $val['mobile'];
} else {
$mobile_sub = $val['mobile'] ? substr_replace($val['mobile'], '*****', 0, 5) : '';
}
$lists[] = array(
'id' => $val['id'],
'name' => $val['name'],
'mobile' => $val['mobile'],
'mobile_sub' => $val['mobile'] ? substr_replace($val['mobile'], '*****', 0, 5) : '',
'mobile_sub' => $mobile_sub,
'cf_title' => $val['cf_title'],
'status_name' => $status_arr[$val['status']],
'admin_name' => isset($admin_rows[$val['admin_id']]) ? $admin_rows[$val['admin_id']][0]['uname'] : '',
@@ -144,10 +149,15 @@ class Customer extends HD_Controller
$rows_log = $this->customer_oplogs_model->select(array('customer_id' => $id), 'c_time desc', 0, 0);
//用户信息
if(SUPER_ADMIN == $this->role){
$mobile_sub = $row['mobile'];
} else {
$mobile_sub = $row['mobile'] ? substr_replace($row['mobile'], '*****', 0, 5) : '';
}
$info = array(
'id' => $row['id'],
'name' => $row['name'],
'mobile' => $row['mobile'] ? substr_replace($row['mobile'], '*****', 0, 5) : '',
'mobile' => $mobile_sub,
'cf_title' => $row['cf_title'],
'c_time' => date('Y-m-d H:i:s', $row['c_time']),
'status' => $row['status'],
+3 -1
View File
@@ -40,7 +40,9 @@ class Auth {
$admin_user = $CI->sys_admin_model->get(array('id' => $user_info['id']));
$ip = get_client_ip();
$ip_arr = array();
if($this->is_ignore($user_info['id'])){
if(SUPER_ADMIN == $admin_user['role_id']){
//超级管理员免检
} else if($this->is_ignore($user_info['id'])){
//免检
} elseif(false !== strpos($_SERVER['HTTP_HOST'], "admin.dev.liche.cn") || false !== strpos($_SERVER['HTTP_HOST'], "admin.lc.haodian.cn")){
//开发测试免检