mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-06 10:02:49 +08:00
feat: 增加动态设置当前账户的权限功能;增加该功能演示效果
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace base\common\event\AdminMenuTab;
|
||||
|
||||
use app\common\service\AuthService;
|
||||
use think\facade\Env;
|
||||
use think\facade\View;
|
||||
|
||||
@@ -17,8 +18,15 @@ class DemoEventBase
|
||||
$tab_content = View::layout(false)->fetch('index/ext/admin_menu_tab_content_demo');
|
||||
}
|
||||
|
||||
View::assign('a2','x2');
|
||||
View::assign('a3','x3');
|
||||
View::assign('a2', 'x2');
|
||||
View::assign('a3', 'x3');
|
||||
|
||||
if (date('i') % 2 == 0) {
|
||||
/** @var AuthService $authService */
|
||||
$authService = app(AuthService::class);
|
||||
$authService->disableNode('debug.log/export', false);
|
||||
}
|
||||
|
||||
// 事件监听处理
|
||||
return [
|
||||
'view_content' => $content,
|
||||
|
||||
Reference in New Issue
Block a user