mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 优化菜单参数
This commit is contained in:
parent
2e30c4e432
commit
315e2f8304
@ -104,7 +104,7 @@ class Login extends Base {
|
||||
public function getAccess($uid) {
|
||||
$isSupper = Tools::isAdministrator($uid);
|
||||
if ($isSupper) {
|
||||
$access = AdminMenu::all(['hide' => 0]);
|
||||
$access = AdminMenu::all(['show' => 1]);
|
||||
$access = Tools::buildArrFromObj($access);
|
||||
|
||||
return array_values(array_filter(array_column($access, 'url')));
|
||||
|
@ -57,7 +57,7 @@ class Menu extends Base {
|
||||
$status = $this->request->get('status');
|
||||
$res = AdminMenu::update([
|
||||
'id' => $id,
|
||||
'hide' => $status
|
||||
'show' => $status
|
||||
]);
|
||||
if ($res === false) {
|
||||
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user