chore: 同步华为云第1台服务器上的关于Menu针对特殊用户限制的代码
This commit is contained in:
@@ -38,7 +38,7 @@ class Menu extends BaseModel
|
|||||||
// if (!empty($cache)) {
|
// if (!empty($cache)) {
|
||||||
// return $this->success($cache);
|
// return $this->success($cache);
|
||||||
// }
|
// }
|
||||||
$list = model('menu')->getList($condition, $field, $order, '', '', '', $limit);
|
$list = model('menu')->getList($condition, $field, $order, '', [], '', $limit);
|
||||||
// Cache::tag("menu")->set("getMenuList_" . $data, $list);
|
// Cache::tag("menu")->set("getMenuList_" . $data, $list);
|
||||||
|
|
||||||
return $this->success($list);
|
return $this->success($list);
|
||||||
|
|||||||
@@ -197,6 +197,14 @@ class BaseShop extends Controller
|
|||||||
$where[] = ['id','<>',2498];
|
$where[] = ['id','<>',2498];
|
||||||
$where1[] = ['id','<>',2498];
|
$where1[] = ['id','<>',2498];
|
||||||
}
|
}
|
||||||
|
if($this->site_id != 2230){
|
||||||
|
$where[] = ['id','<>',2651];
|
||||||
|
$where1[] = ['id','<>',2651];
|
||||||
|
}
|
||||||
|
if($this->site_id != 2558){
|
||||||
|
$where[] = ['id','<>',2657];
|
||||||
|
$where1[] = ['id','<>',2657];
|
||||||
|
}
|
||||||
if ($this->user_info[ 'is_admin' ] || $this->group_info[ 'is_system' ] == 1) {
|
if ($this->user_info[ 'is_admin' ] || $this->group_info[ 'is_system' ] == 1) {
|
||||||
$menus = $menu_model->getMenuList($where, $field, 'level asc,sort asc');
|
$menus = $menu_model->getMenuList($where, $field, 'level asc,sort asc');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user