mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 02:52:49 +08:00
调整统一provider目录;增加content事件的快速登录案例;
This commit is contained in:
23
app/common/event/AdminLoginType/DemoEvent.php
Normal file
23
app/common/event/AdminLoginType/DemoEvent.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\event\AdminLoginType;
|
||||
|
||||
use think\facade\Env;
|
||||
use think\facade\View;
|
||||
|
||||
class DemoEvent
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$content = '';
|
||||
|
||||
if (Env::get('adminsystem.is_demo', false)) {
|
||||
$content = View::layout(false)->fetch('login/ext/demo');
|
||||
}
|
||||
|
||||
// 事件监听处理
|
||||
return [
|
||||
'view_content' => $content,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user