From f0f433f621f2e743ad251ef840de6e9342a1e3b4 Mon Sep 17 00:00:00 2001 From: chenlong Date: Sun, 24 Sep 2023 16:36:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E8=A3=85=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E8=8F=9C=E5=8D=95=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Install.php | 6 +++++- Uninstall.php | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Uninstall.php diff --git a/Install.php b/Install.php index 433ea98..97a7623 100644 --- a/Install.php +++ b/Install.php @@ -3,6 +3,8 @@ namespace Plugins\Notebook; use App\Interfaces\PluginsInstallInterface; +use App\Model\Base\Route; +use App\Util\Hy; use Hyperf\DbConnection\Db; class Install implements PluginsInstallInterface @@ -10,7 +12,9 @@ class Install implements PluginsInstallInterface public static function run(): void { + $table = Route::getPrefix() . Route::table(); + // 添加菜单 - Db::insert("INSERT INTO `sd_module`.`sc_route` (`pid`, `type`, `title`, `icon`, `route`, `power_route`, `weigh`, `create_time`, `update_time`, `delete_time`) VALUES (0, 1, '笔记本', 'Document', '/admin/plugins/notebook/lists', NULL, 1, '2023-09-24 12:36:45', '2023-09-24 12:36:45', NULL);"); + Db::insert("INSERT INTO `$table` (`pid`, `type`, `title`, `icon`, `route`, `power_route`, `weigh`, `create_time`, `update_time`, `delete_time`) VALUES (0, 1, '笔记本', 'Document', '/admin/plugins/notebook/lists', NULL, 1, '2023-09-24 12:36:45', '2023-09-24 12:36:45', NULL);"); } } \ No newline at end of file diff --git a/Uninstall.php b/Uninstall.php new file mode 100644 index 0000000..f18f8bd --- /dev/null +++ b/Uninstall.php @@ -0,0 +1,14 @@ +