添加管理员菜单

This commit is contained in:
luofei 2024-06-04 10:23:52 +08:00
parent 8d36627826
commit 0638963fa1
2 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,31 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\system_store;
use app\common\model\BaseModel;
/**
* 系统菜单
* Class SystemMenu
* @package app\common\model\auth
*/
class SystemStoreMenu extends BaseModel
{
}

View File

@ -20,6 +20,7 @@ use app\common\logic\BaseLogic;
use app\common\model\auth\Admin;
use app\common\model\auth\SystemMenu;
use app\common\model\auth\SystemRoleMenu;
use app\common\model\system_store\SystemStoreMenu;
use app\common\model\system_store\SystemStoreStaff;
@ -55,9 +56,9 @@ class MenuLogic extends BaseLogic
$where[] = ['id', 'in', $roleMenu];
}
$menu = SystemMenu::where($where)
$menu = SystemStoreMenu::where($where)
->order(['sort' => 'desc', 'id' => 'asc'])
->select();
->select()->toArray();
return linear_to_tree($menu, 'children');
}