mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
开始演示用例页面
This commit is contained in:
9
app/common/event/AdminMenuTab/DemoEvent.php
Normal file
9
app/common/event/AdminMenuTab/DemoEvent.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\event\AdminMenuTab;
|
||||
|
||||
use base\common\event\AdminMenuTab\DemoEventBase;
|
||||
|
||||
class DemoEvent extends DemoEventBase
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<!-- <li id="layuiminiDemoTabId" lay-id="">演示用例</li> -->
|
||||
@@ -88,6 +88,7 @@
|
||||
<div class="layuimini-tab layui-tab-rollTool layui-tab" lay-filter="layuiminiTab" lay-allowclose="true">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this" id="layuiminiHomeTabId" lay-id=""></li>
|
||||
{:event_view_content('AdminMenuTab')}
|
||||
</ul>
|
||||
<div class="layui-tab-control">
|
||||
<li class="layuimini-tab-roll-left layui-icon layui-icon-left"></li>
|
||||
|
||||
23
extend/base/common/event/AdminMenuTab/DemoEventBase.php
Normal file
23
extend/base/common/event/AdminMenuTab/DemoEventBase.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace base\common\event\AdminMenuTab;
|
||||
|
||||
use think\facade\Env;
|
||||
use think\facade\View;
|
||||
|
||||
class DemoEventBase
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$content = '';
|
||||
|
||||
if (Env::get('adminsystem.is_demo', false)) {
|
||||
$content = View::layout(false)->fetch('index/ext/admin_menu_tab_demo');
|
||||
}
|
||||
|
||||
// 事件监听处理
|
||||
return [
|
||||
'view_content' => $content,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ namespace think;
|
||||
use app\common\command\Test;
|
||||
use app\common\event\AdminLoginSuccess\LogEvent;
|
||||
use app\common\event\AdminLoginType\DemoEvent;
|
||||
use app\common\event\AdminMenuTab\DemoEvent as AdminMenuTabDemoEvent;
|
||||
use app\common\provider\ExceptionHandle;
|
||||
use app\common\provider\Request;
|
||||
use app\common\provider\View;
|
||||
@@ -30,6 +31,9 @@ class UlthonAdminService extends Service
|
||||
'AdminLoginType' => [
|
||||
DemoEvent::class,
|
||||
],
|
||||
'AdminMenuTab' => [
|
||||
AdminMenuTabDemoEvent::class,
|
||||
],
|
||||
];
|
||||
|
||||
$this->app->event->listenEvents($event_listen);
|
||||
|
||||
Reference in New Issue
Block a user