feat: 增加动态设置当前账户的权限功能;增加该功能演示效果

This commit is contained in:
augushong
2025-04-21 15:54:07 +08:00
parent 81860e8277
commit c1042ce1c6
3 changed files with 59 additions and 3 deletions

View File

@@ -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,