modified 优化菜单参数

This commit is contained in:
zhaoxiang 2020-03-24 23:30:36 +08:00
parent 2e30c4e432
commit 315e2f8304
2 changed files with 2 additions and 2 deletions

View File

@ -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')));

View File

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